home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / MPWGCC (Sources).cpt / Sources / cccp.c < prev    next >
MacBinary  |  1990-08-21  |  149.5 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Aug 21 10:37:59 1990, modified Tue Aug 21 10:37:59 1990, creator 'MPS ', type ASCII, 152448 bytes "cccp.c" , at 0x25400 428 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 63 63 63 70 2e 63 | 00 00 00 00 00 00 00 00 |..cccp.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 02 53 80 00 | 00 01 ac a2 f6 f7 c7 a2 |.....S..|........|
|00000060| f6 f7 c7 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 29 44 00 00 |........|....)D..|
|00000080| 2f 2a 20 43 20 43 6f 6d | 70 61 74 69 62 6c 65 20 |/* C Com|patible |
|00000090| 43 6f 6d 70 69 6c 65 72 | 20 50 72 65 70 72 6f 63 |Compiler| Preproc|
|000000a0| 65 73 73 6f 72 20 28 43 | 43 43 50 29 0d 43 6f 70 |essor (C|CCP).Cop|
|000000b0| 79 72 69 67 68 74 20 28 | 43 29 20 31 39 38 36 2c |yright (|C) 1986,|
|000000c0| 20 31 39 38 37 2c 20 31 | 39 38 39 20 46 72 65 65 | 1987, 1|989 Free|
|000000d0| 20 53 6f 66 74 77 61 72 | 65 20 46 6f 75 6e 64 61 | Softwar|e Founda|
|000000e0| 74 69 6f 6e 2c 20 49 6e | 63 2e 0d 20 20 20 20 20 |tion, In|c.. |
|000000f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 57 | | W|
|00000100| 72 69 74 74 65 6e 20 62 | 79 20 50 61 75 6c 20 52 |ritten b|y Paul R|
|00000110| 75 62 69 6e 2c 20 4a 75 | 6e 65 20 31 39 38 36 0d |ubin, Ju|ne 1986.|
|00000120| 09 09 20 20 20 20 41 64 | 61 70 74 65 64 20 74 6f |.. Ad|apted to|
|00000130| 20 41 4e 53 49 20 43 2c | 20 52 69 63 68 61 72 64 | ANSI C,| Richard|
|00000140| 20 53 74 61 6c 6c 6d 61 | 6e 2c 20 4a 61 6e 20 31 | Stallma|n, Jan 1|
|00000150| 39 38 37 0d 43 6f 70 79 | 72 69 67 68 74 20 28 43 |987.Copy|right (C|
|00000160| 29 20 31 39 38 39 2c 20 | 31 39 39 30 20 41 70 70 |) 1989, |1990 App|
|00000170| 6c 65 20 43 6f 6d 70 75 | 74 65 72 2c 20 49 6e 63 |le Compu|ter, Inc|
|00000180| 2e 0d 0d 54 68 69 73 20 | 70 72 6f 67 72 61 6d 20 |...This |program |
|00000190| 69 73 20 66 72 65 65 20 | 73 6f 66 74 77 61 72 65 |is free |software|
|000001a0| 3b 20 79 6f 75 20 63 61 | 6e 20 72 65 64 69 73 74 |; you ca|n redist|
|000001b0| 72 69 62 75 74 65 20 69 | 74 20 61 6e 64 2f 6f 72 |ribute i|t and/or|
|000001c0| 20 6d 6f 64 69 66 79 20 | 69 74 0d 75 6e 64 65 72 | modify |it.under|
|000001d0| 20 74 68 65 20 74 65 72 | 6d 73 20 6f 66 20 74 68 | the ter|ms of th|
|000001e0| 65 20 47 4e 55 20 47 65 | 6e 65 72 61 6c 20 50 75 |e GNU Ge|neral Pu|
|000001f0| 62 6c 69 63 20 4c 69 63 | 65 6e 73 65 20 61 73 20 |blic Lic|ense as |
|00000200| 70 75 62 6c 69 73 68 65 | 64 20 62 79 20 74 68 65 |publishe|d by the|
|00000210| 0d 46 72 65 65 20 53 6f | 66 74 77 61 72 65 20 46 |.Free So|ftware F|
|00000220| 6f 75 6e 64 61 74 69 6f | 6e 3b 20 65 69 74 68 65 |oundatio|n; eithe|
|00000230| 72 20 76 65 72 73 69 6f | 6e 20 31 2c 20 6f 72 20 |r versio|n 1, or |
|00000240| 28 61 74 20 79 6f 75 72 | 20 6f 70 74 69 6f 6e 29 |(at your| option)|
|00000250| 20 61 6e 79 0d 6c 61 74 | 65 72 20 76 65 72 73 69 | any.lat|er versi|
|00000260| 6f 6e 2e 0d 0d 54 68 69 | 73 20 70 72 6f 67 72 61 |on...Thi|s progra|
|00000270| 6d 20 69 73 20 64 69 73 | 74 72 69 62 75 74 65 64 |m is dis|tributed|
|00000280| 20 69 6e 20 74 68 65 20 | 68 6f 70 65 20 74 68 61 | in the |hope tha|
|00000290| 74 20 69 74 20 77 69 6c | 6c 20 62 65 20 75 73 65 |t it wil|l be use|
|000002a0| 66 75 6c 2c 0d 62 75 74 | 20 57 49 54 48 4f 55 54 |ful,.but| WITHOUT|
|000002b0| 20 41 4e 59 20 57 41 52 | 52 41 4e 54 59 3b 20 77 | ANY WAR|RANTY; w|
|000002c0| 69 74 68 6f 75 74 20 65 | 76 65 6e 20 74 68 65 20 |ithout e|ven the |
|000002d0| 69 6d 70 6c 69 65 64 20 | 77 61 72 72 61 6e 74 79 |implied |warranty|
|000002e0| 20 6f 66 0d 4d 45 52 43 | 48 41 4e 54 41 42 49 4c | of.MERC|HANTABIL|
|000002f0| 49 54 59 20 6f 72 20 46 | 49 54 4e 45 53 53 20 46 |ITY or F|ITNESS F|
|00000300| 4f 52 20 41 20 50 41 52 | 54 49 43 55 4c 41 52 20 |OR A PAR|TICULAR |
|00000310| 50 55 52 50 4f 53 45 2e | 20 20 53 65 65 20 74 68 |PURPOSE.| See th|
|00000320| 65 0d 47 4e 55 20 47 65 | 6e 65 72 61 6c 20 50 75 |e.GNU Ge|neral Pu|
|00000330| 62 6c 69 63 20 4c 69 63 | 65 6e 73 65 20 66 6f 72 |blic Lic|ense for|
|00000340| 20 6d 6f 72 65 20 64 65 | 74 61 69 6c 73 2e 0d 0d | more de|tails...|
|00000350| 59 6f 75 20 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |You shou|ld have |
|00000360| 72 65 63 65 69 76 65 64 | 20 61 20 63 6f 70 79 20 |received| a copy |
|00000370| 6f 66 20 74 68 65 20 47 | 4e 55 20 47 65 6e 65 72 |of the G|NU Gener|
|00000380| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|00000390| 65 0d 61 6c 6f 6e 67 20 | 77 69 74 68 20 74 68 69 |e.along |with thi|
|000003a0| 73 20 70 72 6f 67 72 61 | 6d 3b 20 69 66 20 6e 6f |s progra|m; if no|
|000003b0| 74 2c 20 77 72 69 74 65 | 20 74 6f 20 74 68 65 20 |t, write| to the |
|000003c0| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 0d 46 6f |Free Sof|tware.Fo|
|000003d0| 75 6e 64 61 74 69 6f 6e | 2c 20 36 37 35 20 4d 61 |undation|, 675 Ma|
|000003e0| 73 73 20 41 76 65 2c 20 | 43 61 6d 62 72 69 64 67 |ss Ave, |Cambridg|
|000003f0| 65 2c 20 4d 41 20 30 32 | 31 33 39 2c 20 55 53 41 |e, MA 02|139, USA|
|00000400| 2e 0d 0d 20 49 6e 20 6f | 74 68 65 72 20 77 6f 72 |... In o|ther wor|
|00000410| 64 73 2c 20 79 6f 75 20 | 61 72 65 20 77 65 6c 63 |ds, you |are welc|
|00000420| 6f 6d 65 20 74 6f 20 75 | 73 65 2c 20 73 68 61 72 |ome to u|se, shar|
|00000430| 65 20 61 6e 64 20 69 6d | 70 72 6f 76 65 20 74 68 |e and im|prove th|
|00000440| 69 73 20 70 72 6f 67 72 | 61 6d 2e 0d 20 59 6f 75 |is progr|am.. You|
|00000450| 20 61 72 65 20 66 6f 72 | 62 69 64 64 65 6e 20 74 | are for|bidden t|
|00000460| 6f 20 66 6f 72 62 69 64 | 20 61 6e 79 6f 6e 65 20 |o forbid| anyone |
|00000470| 65 6c 73 65 20 74 6f 20 | 75 73 65 2c 20 73 68 61 |else to |use, sha|
|00000480| 72 65 20 61 6e 64 20 69 | 6d 70 72 6f 76 65 0d 20 |re and i|mprove. |
|00000490| 77 68 61 74 20 79 6f 75 | 20 67 69 76 65 20 74 68 |what you| give th|
|000004a0| 65 6d 2e 20 20 20 48 65 | 6c 70 20 73 74 61 6d 70 |em. He|lp stamp|
|000004b0| 20 6f 75 74 20 73 6f 66 | 74 77 61 72 65 2d 68 6f | out sof|tware-ho|
|000004c0| 61 72 64 69 6e 67 21 20 | 20 2a 2f 0d 0c 0d 74 79 |arding! | */...ty|
|000004d0| 70 65 64 65 66 20 75 6e | 73 69 67 6e 65 64 20 63 |pedef un|signed c|
|000004e0| 68 61 72 20 55 5f 43 48 | 41 52 3b 0d 0d 23 69 66 |har U_CH|AR;..#if|
|000004f0| 64 65 66 20 45 4d 41 43 | 53 0d 23 64 65 66 69 6e |def EMAC|S.#defin|
|00000500| 65 20 4e 4f 5f 53 48 4f | 52 54 4e 41 4d 45 53 0d |e NO_SHO|RTNAMES.|
|00000510| 23 69 6e 63 6c 75 64 65 | 20 22 2e 2e 2f 73 72 63 |#include| "../src|
|00000520| 2f 63 6f 6e 66 69 67 2e | 68 22 0d 23 69 66 64 65 |/config.|h".#ifde|
|00000530| 66 20 6f 70 65 6e 0d 23 | 75 6e 64 65 66 20 6f 70 |f open.#|undef op|
|00000540| 65 6e 0d 23 75 6e 64 65 | 66 20 72 65 61 64 0d 23 |en.#unde|f read.#|
|00000550| 75 6e 64 65 66 20 77 72 | 69 74 65 0d 23 65 6e 64 |undef wr|ite.#end|
|00000560| 69 66 20 2f 2a 20 6f 70 | 65 6e 20 2a 2f 0d 23 65 |if /* op|en */.#e|
|00000570| 6e 64 69 66 20 2f 2a 20 | 45 4d 41 43 53 20 2a 2f |ndif /* |EMACS */|
|00000580| 0d 0d 23 69 66 6e 64 65 | 66 20 45 4d 41 43 53 0d |..#ifnde|f EMACS.|
|00000590| 23 69 6e 63 6c 75 64 65 | 20 22 63 6f 6e 66 69 67 |#include| "config|
|000005a0| 2e 68 22 0d 23 65 6e 64 | 69 66 20 2f 2a 20 6e 6f |.h".#end|if /* no|
|000005b0| 74 20 45 4d 41 43 53 20 | 2a 2f 0d 0d 2f 2a 20 49 |t EMACS |*/../* I|
|000005c0| 6e 20 63 61 73 65 20 63 | 6f 6e 66 69 67 2e 68 20 |n case c|onfig.h |
|000005d0| 64 65 66 69 6e 65 73 20 | 74 68 65 73 65 2e 20 20 |defines |these. |
|000005e0| 2a 2f 0d 23 75 6e 64 65 | 66 20 62 63 6f 70 79 0d |*/.#unde|f bcopy.|
|000005f0| 23 75 6e 64 65 66 20 62 | 7a 65 72 6f 0d 23 75 6e |#undef b|zero.#un|
|00000600| 64 65 66 20 62 63 6d 70 | 0d 0d 23 69 66 64 65 66 |def bcmp|..#ifdef|
|00000610| 20 4d 50 57 0d 2f 2a 20 | 49 6e 63 6c 75 64 65 20 | MPW./* |Include |
|00000620| 4d 50 57 27 73 20 6f 77 | 6e 20 76 65 72 73 69 6f |MPW's ow|n versio|
|00000630| 6e 73 20 6f 66 20 69 6e | 63 6c 75 64 65 20 66 69 |ns of in|clude fi|
|00000640| 6c 65 73 2e 20 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |les. */.|#include|
|00000650| 20 3c 63 74 79 70 65 2e | 68 3e 0d 23 69 6e 63 6c | <ctype.|h>.#incl|
|00000660| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0d 23 69 |ude <std|io.h>.#i|
|00000670| 6e 63 6c 75 64 65 20 3c | 73 69 67 6e 61 6c 2e 68 |nclude <|signal.h|
|00000680| 3e 0d 23 65 6c 73 65 0d | 23 69 6e 63 6c 75 64 65 |>.#else.|#include|
|00000690| 20 3c 73 79 73 2f 74 79 | 70 65 73 2e 68 3e 0d 23 | <sys/ty|pes.h>.#|
|000006a0| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 73 74 61 |include |<sys/sta|
|000006b0| 74 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 63 |t.h>.#in|clude <c|
|000006c0| 74 79 70 65 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |type.h>.|#include|
|000006d0| 20 3c 73 74 64 69 6f 2e | 68 3e 0d 23 69 6e 63 6c | <stdio.|h>.#incl|
|000006e0| 75 64 65 20 3c 73 69 67 | 6e 61 6c 2e 68 3e 0d 23 |ude <sig|nal.h>.#|
|000006f0| 65 6e 64 69 66 0d 0d 23 | 69 66 64 65 66 20 4d 50 |endif..#|ifdef MP|
|00000700| 57 0d 23 69 6e 63 6c 75 | 64 65 20 3c 66 69 6c 65 |W.#inclu|de <file|
|00000710| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 66 |s.h>.#in|clude <f|
|00000720| 63 6e 74 6c 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |cntl.h>.|#include|
|00000730| 20 3c 74 69 6d 65 2e 68 | 3e 0d 23 69 6e 63 6c 75 | <time.h|>.#inclu|
|00000740| 64 65 20 3c 65 72 72 6e | 6f 2e 68 3e 0d 2f 2a 20 |de <errn|o.h>./* |
|00000750| 68 61 63 6b 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |hack */.|#define |
|00000760| 53 5f 49 46 4d 54 20 30 | 31 37 0d 23 64 65 66 69 |S_IFMT 0|17.#defi|
|00000770| 6e 65 20 53 5f 49 46 52 | 45 47 20 30 31 0d 23 64 |ne S_IFR|EG 01.#d|
|00000780| 65 66 69 6e 65 20 6f 70 | 65 6e 28 78 2c 79 2c 7a |efine op|en(x,y,z|
|00000790| 29 20 6f 70 65 6e 28 78 | 2c 20 79 29 0d 23 64 65 |) open(x|, y).#de|
|000007a0| 66 69 6e 65 20 69 6e 64 | 65 78 20 73 74 72 63 68 |fine ind|ex strch|
|000007b0| 72 0d 23 64 65 66 69 6e | 65 20 72 69 6e 64 65 78 |r.#defin|e rindex|
|000007c0| 20 73 74 72 72 63 68 72 | 0d 23 65 6c 73 65 20 2f | strrchr|.#else /|
|000007d0| 2a 20 6e 6f 74 20 4d 50 | 57 20 2a 2f 0d 23 69 66 |* not MP|W */.#if|
|000007e0| 6e 64 65 66 20 56 4d 53 | 0d 23 69 6e 63 6c 75 64 |ndef VMS|.#includ|
|000007f0| 65 20 3c 73 79 73 2f 66 | 69 6c 65 2e 68 3e 0d 23 |e <sys/f|ile.h>.#|
|00000800| 69 66 6e 64 65 66 20 55 | 53 47 0d 23 69 6e 63 6c |ifndef U|SG.#incl|
|00000810| 75 64 65 20 3c 73 79 73 | 2f 74 69 6d 65 2e 68 3e |ude <sys|/time.h>|
|00000820| 09 09 2f 2a 20 66 6f 72 | 20 5f 5f 44 41 54 45 5f |../* for| __DATE_|
|00000830| 5f 20 61 6e 64 20 5f 5f | 54 49 4d 45 5f 5f 20 2a |_ and __|TIME__ *|
|00000840| 2f 0d 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |/.#inclu|de <sys/|
|00000850| 72 65 73 6f 75 72 63 65 | 2e 68 3e 0d 23 65 6c 73 |resource|.h>.#els|
|00000860| 65 0d 23 64 65 66 69 6e | 65 20 69 6e 64 65 78 20 |e.#defin|e index |
|00000870| 73 74 72 63 68 72 0d 23 | 64 65 66 69 6e 65 20 72 |strchr.#|define r|
|00000880| 69 6e 64 65 78 20 73 74 | 72 72 63 68 72 0d 23 69 |index st|rrchr.#i|
|00000890| 6e 63 6c 75 64 65 20 3c | 74 69 6d 65 2e 68 3e 0d |nclude <|time.h>.|
|000008a0| 23 69 6e 63 6c 75 64 65 | 20 3c 66 63 6e 74 6c 2e |#include| <fcntl.|
|000008b0| 68 3e 0d 23 65 6e 64 69 | 66 20 2f 2a 20 55 53 47 |h>.#endi|f /* USG|
|000008c0| 20 2a 2f 0d 23 65 6e 64 | 69 66 20 2f 2a 20 6e 6f | */.#end|if /* no|
|000008d0| 74 20 56 4d 53 20 2a 2f | 0d 23 65 6e 64 69 66 20 |t VMS */|.#endif |
|000008e0| 2f 2a 20 4d 50 57 20 2a | 2f 0d 20 20 0d 2f 2a 20 |/* MPW *|/. ./* |
|000008f0| 56 4d 53 2d 73 70 65 63 | 69 66 69 63 20 64 65 66 |VMS-spec|ific def|
|00000900| 69 6e 69 74 69 6f 6e 73 | 20 2a 2f 0d 23 69 66 64 |initions| */.#ifd|
|00000910| 65 66 20 56 4d 53 0d 23 | 69 6e 63 6c 75 64 65 20 |ef VMS.#|include |
|00000920| 3c 74 69 6d 65 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |<time.h>|.#includ|
|00000930| 65 20 3c 65 72 72 6e 6f | 2e 68 3e 09 09 2f 2a 20 |e <errno|.h>../* |
|00000940| 54 68 69 73 20 64 65 66 | 69 6e 65 73 20 22 65 72 |This def|ines "er|
|00000950| 72 6e 6f 22 20 70 72 6f | 70 65 72 6c 79 20 2a 2f |rno" pro|perly */|
|00000960| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 70 65 72 72 6f |.#includ|e <perro|
|00000970| 72 2e 68 3e 09 09 2f 2a | 20 54 68 69 73 20 64 65 |r.h>../*| This de|
|00000980| 66 69 6e 65 73 20 73 79 | 73 5f 65 72 72 6c 69 73 |fines sy|s_errlis|
|00000990| 74 2f 73 79 73 5f 6e 65 | 72 72 20 70 72 6f 70 65 |t/sys_ne|rr prope|
|000009a0| 72 6c 79 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 4f |rly */.#|define O|
|000009b0| 5f 52 44 4f 4e 4c 59 09 | 30 09 2f 2a 20 4f 70 65 |_RDONLY.|0./* Ope|
|000009c0| 6e 20 61 72 67 20 66 6f | 72 20 52 65 61 64 2f 4f |n arg fo|r Read/O|
|000009d0| 6e 6c 79 20 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |nly */.|#define |
|000009e0| 4f 5f 57 52 4f 4e 4c 59 | 09 31 09 2f 2a 20 4f 70 |O_WRONLY|.1./* Op|
|000009f0| 65 6e 20 61 72 67 20 66 | 6f 72 20 57 72 69 74 65 |en arg f|or Write|
|00000a00| 2f 4f 6e 6c 79 20 2a 2f | 0d 23 64 65 66 69 6e 65 |/Only */|.#define|
|00000a10| 20 72 65 61 64 28 66 64 | 2c 62 75 66 2c 73 69 7a | read(fd|,buf,siz|
|00000a20| 65 29 09 56 41 58 31 31 | 5f 43 5f 72 65 61 64 28 |e).VAX11|_C_read(|
|00000a30| 66 64 2c 62 75 66 2c 73 | 69 7a 65 29 0d 23 64 65 |fd,buf,s|ize).#de|
|00000a40| 66 69 6e 65 20 77 72 69 | 74 65 28 66 64 2c 62 75 |fine wri|te(fd,bu|
|00000a50| 66 2c 73 69 7a 65 29 09 | 56 41 58 31 31 5f 43 5f |f,size).|VAX11_C_|
|00000a60| 77 72 69 74 65 28 66 64 | 2c 62 75 66 2c 73 69 7a |write(fd|,buf,siz|
|00000a70| 65 29 0d 23 69 66 64 65 | 66 20 5f 5f 47 4e 55 43 |e).#ifde|f __GNUC|
|00000a80| 5f 5f 0d 23 64 65 66 69 | 6e 65 20 42 53 54 52 49 |__.#defi|ne BSTRI|
|00000a90| 4e 47 09 09 09 2f 2a 20 | 56 4d 53 2f 47 43 43 20 |NG.../* |VMS/GCC |
|00000aa0| 73 75 70 70 6c 69 65 73 | 20 74 68 65 20 62 73 74 |supplies| the bst|
|00000ab0| 72 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 20 2a 2f |ring rou|tines */|
|00000ac0| 0d 23 65 6e 64 69 66 20 | 2f 2a 20 5f 5f 47 4e 55 |.#endif |/* __GNU|
|00000ad0| 43 5f 5f 20 2a 2f 0d 23 | 65 6e 64 69 66 20 2f 2a |C__ */.#|endif /*|
|00000ae0| 20 56 4d 53 20 2a 2f 0d | 0d 23 69 66 64 65 66 20 | VMS */.|.#ifdef |
|00000af0| 4d 50 57 0d 23 69 6e 63 | 6c 75 64 65 20 3c 43 75 |MPW.#inc|lude <Cu|
|00000b00| 72 73 6f 72 43 74 6c 2e | 68 3e 0d 23 65 6e 64 69 |rsorCtl.|h>.#endi|
|00000b10| 66 20 2f 2a 20 4d 50 57 | 20 2a 2f 0d 0d 23 64 65 |f /* MPW| */..#de|
|00000b20| 66 69 6e 65 20 6d 61 78 | 28 61 2c 62 29 20 28 28 |fine max|(a,b) ((|
|00000b30| 61 29 20 3e 20 28 62 29 | 20 3f 20 28 61 29 20 3a |a) > (b)| ? (a) :|
|00000b40| 20 28 62 29 29 0d 0d 2f | 2a 20 45 78 74 65 72 6e | (b))../|* Extern|
|00000b50| 61 6c 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 2e |al decla|rations.|
|00000b60| 20 20 2a 2f 0d 0d 76 6f | 69 64 20 62 63 6f 70 79 | */..vo|id bcopy|
|00000b70| 20 28 29 2c 20 62 7a 65 | 72 6f 20 28 29 3b 0d 69 | (), bze|ro ();.i|
|00000b80| 6e 74 20 62 63 6d 70 20 | 28 29 3b 0d 65 78 74 65 |nt bcmp |();.exte|
|00000b90| 72 6e 20 63 68 61 72 20 | 2a 67 65 74 65 6e 76 20 |rn char |*getenv |
|00000ba0| 28 29 3b 0d 65 78 74 65 | 72 6e 20 63 68 61 72 20 |();.exte|rn char |
|00000bb0| 2a 76 65 72 73 69 6f 6e | 5f 73 74 72 69 6e 67 3b |*version|_string;|
|00000bc0| 0d 0d 2f 2a 20 46 6f 72 | 77 61 72 64 20 64 65 63 |../* For|ward dec|
|00000bd0| 6c 61 72 61 74 69 6f 6e | 73 2e 20 20 2a 2f 0d 0d |laration|s. */..|
|00000be0| 73 74 72 75 63 74 20 64 | 69 72 65 63 74 69 76 65 |struct d|irective|
|00000bf0| 3b 0d 73 74 72 75 63 74 | 20 66 69 6c 65 5f 62 75 |;.struct| file_bu|
|00000c00| 66 3b 0d 73 74 72 75 63 | 74 20 61 72 67 6c 69 73 |f;.struc|t arglis|
|00000c10| 74 3b 0d 73 74 72 75 63 | 74 20 61 72 67 64 61 74 |t;.struc|t argdat|
|00000c20| 61 3b 0d 0d 69 6e 74 20 | 64 6f 5f 64 65 66 69 6e |a;..int |do_defin|
|00000c30| 65 20 28 29 2c 20 64 6f | 5f 6c 69 6e 65 20 28 29 |e (), do|_line ()|
|00000c40| 2c 20 64 6f 5f 69 6e 63 | 6c 75 64 65 20 28 29 2c |, do_inc|lude (),|
|00000c50| 20 64 6f 5f 75 6e 64 65 | 66 20 28 29 2c 20 64 6f | do_unde|f (), do|
|00000c60| 5f 65 72 72 6f 72 20 28 | 29 2c 0d 20 20 64 6f 5f |_error (|),. do_|
|00000c70| 70 72 61 67 6d 61 20 28 | 29 2c 20 64 6f 5f 69 66 |pragma (|), do_if|
|00000c80| 20 28 29 2c 20 64 6f 5f | 78 69 66 64 65 66 20 28 | (), do_|xifdef (|
|00000c90| 29 2c 20 64 6f 5f 65 6c | 73 65 20 28 29 2c 0d 20 |), do_el|se (),. |
|00000ca0| 20 64 6f 5f 65 6c 69 66 | 20 28 29 2c 20 64 6f 5f | do_elif| (), do_|
|00000cb0| 65 6e 64 69 66 20 28 29 | 2c 20 64 6f 5f 73 63 63 |endif ()|, do_scc|
|00000cc0| 73 20 28 29 2c 20 64 6f | 5f 6f 6e 63 65 20 28 29 |s (), do|_once ()|
|00000cd0| 3b 0d 0d 73 74 72 75 63 | 74 20 68 61 73 68 6e 6f |;..struc|t hashno|
|00000ce0| 64 65 20 2a 69 6e 73 74 | 61 6c 6c 20 28 29 3b 0d |de *inst|all ();.|
|00000cf0| 73 74 72 75 63 74 20 68 | 61 73 68 6e 6f 64 65 20 |struct h|ashnode |
|00000d00| 2a 6c 6f 6f 6b 75 70 20 | 28 29 3b 0d 0d 63 68 61 |*lookup |();..cha|
|00000d10| 72 20 2a 78 6d 61 6c 6c | 6f 63 20 28 29 2c 20 2a |r *xmall|oc (), *|
|00000d20| 78 72 65 61 6c 6c 6f 63 | 20 28 29 2c 20 2a 78 63 |xrealloc| (), *xc|
|00000d30| 61 6c 6c 6f 63 20 28 29 | 2c 20 2a 73 61 76 65 73 |alloc ()|, *saves|
|00000d40| 74 72 69 6e 67 20 28 29 | 3b 0d 76 6f 69 64 20 66 |tring ()|;.void f|
|00000d50| 61 74 61 6c 20 28 29 2c | 20 66 61 6e 63 79 5f 61 |atal (),| fancy_a|
|00000d60| 62 6f 72 74 20 28 29 2c | 20 70 66 61 74 61 6c 5f |bort (),| pfatal_|
|00000d70| 77 69 74 68 5f 6e 61 6d | 65 20 28 29 2c 20 70 65 |with_nam|e (), pe|
|00000d80| 72 72 6f 72 5f 77 69 74 | 68 5f 6e 61 6d 65 20 28 |rror_wit|h_name (|
|00000d90| 29 3b 0d 0d 76 6f 69 64 | 20 6d 61 63 72 6f 65 78 |);..void| macroex|
|00000da0| 70 61 6e 64 20 28 29 3b | 0d 76 6f 69 64 20 64 75 |pand ();|.void du|
|00000db0| 6d 70 5f 61 6c 6c 5f 6d | 61 63 72 6f 73 20 28 29 |mp_all_m|acros ()|
|00000dc0| 3b 0d 76 6f 69 64 20 63 | 6f 6e 64 69 74 69 6f 6e |;.void c|ondition|
|00000dd0| 61 6c 5f 73 6b 69 70 20 | 28 29 3b 0d 76 6f 69 64 |al_skip |();.void|
|00000de0| 20 73 6b 69 70 5f 69 66 | 5f 67 72 6f 75 70 20 28 | skip_if|_group (|
|00000df0| 29 3b 0d 76 6f 69 64 20 | 6f 75 74 70 75 74 5f 6c |);.void |output_l|
|00000e00| 69 6e 65 5f 63 6f 6d 6d | 61 6e 64 20 28 29 3b 0d |ine_comm|and ();.|
|00000e10| 2f 2a 20 4c 61 73 74 20 | 61 72 67 20 74 6f 20 6f |/* Last |arg to o|
|00000e20| 75 74 70 75 74 5f 6c 69 | 6e 65 5f 63 6f 6d 6d 61 |utput_li|ne_comma|
|00000e30| 6e 64 2e 20 20 2a 2f 0d | 65 6e 75 6d 20 66 69 6c |nd. */.|enum fil|
|00000e40| 65 5f 63 68 61 6e 67 65 | 5f 63 6f 64 65 20 7b 73 |e_change|_code {s|
|00000e50| 61 6d 65 5f 66 69 6c 65 | 2c 20 65 6e 74 65 72 5f |ame_file|, enter_|
|00000e60| 66 69 6c 65 2c 20 6c 65 | 61 76 65 5f 66 69 6c 65 |file, le|ave_file|
|00000e70| 7d 3b 0d 0d 69 6e 74 20 | 67 72 6f 77 5f 6f 75 74 |};..int |grow_out|
|00000e80| 62 75 66 20 28 29 3b 0d | 69 6e 74 20 68 61 6e 64 |buf ();.|int hand|
|00000e90| 6c 65 5f 64 69 72 65 63 | 74 69 76 65 20 28 29 3b |le_direc|tive ();|
|00000ea0| 0d 76 6f 69 64 20 6d 65 | 6d 6f 72 79 5f 66 75 6c |.void me|mory_ful|
|00000eb0| 6c 20 28 29 3b 0d 0d 55 | 5f 43 48 41 52 20 2a 6d |l ();..U|_CHAR *m|
|00000ec0| 61 63 61 72 67 31 20 28 | 29 3b 0d 63 68 61 72 20 |acarg1 (|);.char |
|00000ed0| 2a 6d 61 63 61 72 67 20 | 28 29 3b 0d 0d 55 5f 43 |*macarg |();..U_C|
|00000ee0| 48 41 52 20 2a 73 6b 69 | 70 5f 74 6f 5f 65 6e 64 |HAR *ski|p_to_end|
|00000ef0| 5f 6f 66 5f 63 6f 6d 6d | 65 6e 74 20 28 29 3b 0d |_of_comm|ent ();.|
|00000f00| 55 5f 43 48 41 52 20 2a | 73 6b 69 70 5f 71 75 6f |U_CHAR *|skip_quo|
|00000f10| 74 65 64 5f 73 74 72 69 | 6e 67 20 28 29 3b 0d 0c |ted_stri|ng ();..|
|00000f20| 0d 23 69 66 6e 64 65 66 | 20 46 41 54 41 4c 5f 45 |.#ifndef| FATAL_E|
|00000f30| 58 49 54 5f 43 4f 44 45 | 0d 23 64 65 66 69 6e 65 |XIT_CODE|.#define|
|00000f40| 20 46 41 54 41 4c 5f 45 | 58 49 54 5f 43 4f 44 45 | FATAL_E|XIT_CODE|
|00000f50| 20 33 33 09 2f 2a 20 67 | 6e 75 20 63 63 20 63 6f | 33./* g|nu cc co|
|00000f60| 6d 6d 61 6e 64 20 75 6e | 64 65 72 73 74 61 6e 64 |mmand un|derstand|
|00000f70| 73 20 74 68 69 73 20 2a | 2f 0d 23 65 6e 64 69 66 |s this *|/.#endif|
|00000f80| 0d 0d 23 69 66 6e 64 65 | 66 20 53 55 43 43 45 53 |..#ifnde|f SUCCES|
|00000f90| 53 5f 45 58 49 54 5f 43 | 4f 44 45 0d 23 64 65 66 |S_EXIT_C|ODE.#def|
|00000fa0| 69 6e 65 20 53 55 43 43 | 45 53 53 5f 45 58 49 54 |ine SUCC|ESS_EXIT|
|00000fb0| 5f 43 4f 44 45 20 30 09 | 2f 2a 20 30 20 6d 65 61 |_CODE 0.|/* 0 mea|
|00000fc0| 6e 73 20 73 75 63 63 65 | 73 73 20 6f 6e 20 55 6e |ns succe|ss on Un|
|00000fd0| 69 78 2e 20 20 2a 2f 0d | 23 65 6e 64 69 66 0d 0d |ix. */.|#endif..|
|00000fe0| 2f 2a 20 4e 61 6d 65 20 | 75 6e 64 65 72 20 77 68 |/* Name |under wh|
|00000ff0| 69 63 68 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d |ich this| program|
|00001000| 20 77 61 73 20 69 6e 76 | 6f 6b 65 64 2e 20 20 2a | was inv|oked. *|
|00001010| 2f 0d 0d 63 68 61 72 20 | 2a 70 72 6f 67 6e 61 6d |/..char |*prognam|
|00001020| 65 3b 0d 0d 2f 2a 20 4e | 6f 6e 7a 65 72 6f 20 6d |e;../* N|onzero m|
|00001030| 65 61 6e 73 20 68 61 6e | 64 6c 65 20 43 2b 2b 20 |eans han|dle C++ |
|00001040| 63 6f 6d 6d 65 6e 74 20 | 73 79 6e 74 61 78 20 61 |comment |syntax a|
|00001050| 6e 64 20 75 73 65 0d 20 | 20 20 65 78 74 72 61 20 |nd use. | extra |
|00001060| 64 65 66 61 75 6c 74 20 | 69 6e 63 6c 75 64 65 20 |default |include |
|00001070| 64 69 72 65 63 74 6f 72 | 69 65 73 20 66 6f 72 20 |director|ies for |
|00001080| 43 2b 2b 2e 20 20 2a 2f | 0d 0d 69 6e 74 20 63 70 |C++. */|..int cp|
|00001090| 6c 75 73 70 6c 75 73 3b | 0d 0d 2f 2a 20 43 75 72 |lusplus;|../* Cur|
|000010a0| 72 65 6e 74 20 6d 61 78 | 69 6d 75 6d 20 6c 65 6e |rent max|imum len|
|000010b0| 67 74 68 20 6f 66 20 64 | 69 72 65 63 74 6f 72 79 |gth of d|irectory|
|000010c0| 20 6e 61 6d 65 73 20 69 | 6e 20 74 68 65 20 73 65 | names i|n the se|
|000010d0| 61 72 63 68 20 70 61 74 | 68 0d 20 20 20 66 6f 72 |arch pat|h. for|
|000010e0| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 73 2e 20 | include| files. |
|000010f0| 20 28 41 6c 74 65 72 65 | 64 20 61 73 20 77 65 20 | (Altere|d as we |
|00001100| 67 65 74 20 6d 6f 72 65 | 20 6f 66 20 74 68 65 6d |get more| of them|
|00001110| 2e 29 20 20 2a 2f 0d 0d | 69 6e 74 20 6d 61 78 5f |.) */..|int max_|
|00001120| 69 6e 63 6c 75 64 65 5f | 6c 65 6e 3b 0d 0d 2f 2a |include_|len;../*|
|00001130| 20 4e 6f 6e 7a 65 72 6f | 20 6d 65 61 6e 73 20 63 | Nonzero| means c|
|00001140| 6f 70 79 20 63 6f 6d 6d | 65 6e 74 73 20 69 6e 74 |opy comm|ents int|
|00001150| 6f 20 74 68 65 20 6f 75 | 74 70 75 74 20 66 69 6c |o the ou|tput fil|
|00001160| 65 2e 20 20 2a 2f 0d 0d | 69 6e 74 20 70 75 74 5f |e. */..|int put_|
|00001170| 6f 75 74 5f 63 6f 6d 6d | 65 6e 74 73 20 3d 20 30 |out_comm|ents = 0|
|00001180| 3b 0d 0d 2f 2a 20 4e 6f | 6e 7a 65 72 6f 20 6d 65 |;../* No|nzero me|
|00001190| 61 6e 73 20 64 6f 6e 27 | 74 20 70 72 6f 63 65 73 |ans don'|t proces|
|000011a0| 73 20 74 68 65 20 41 4e | 53 49 20 74 72 69 67 72 |s the AN|SI trigr|
|000011b0| 61 70 68 20 73 65 71 75 | 65 6e 63 65 73 2e 20 20 |aph sequ|ences. |
|000011c0| 2a 2f 0d 0d 69 6e 74 20 | 6e 6f 5f 74 72 69 67 72 |*/..int |no_trigr|
|000011d0| 61 70 68 73 20 3d 20 30 | 3b 0d 0d 2f 2a 20 4e 6f |aphs = 0|;../* No|
|000011e0| 6e 7a 65 72 6f 20 6d 65 | 61 6e 73 20 70 72 69 6e |nzero me|ans prin|
|000011f0| 74 20 74 68 65 20 6e 61 | 6d 65 73 20 6f 66 20 69 |t the na|mes of i|
|00001200| 6e 63 6c 75 64 65 64 20 | 66 69 6c 65 73 20 72 61 |ncluded |files ra|
|00001210| 74 68 65 72 20 74 68 61 | 6e 0d 20 20 20 74 68 65 |ther tha|n. the|
|00001220| 20 70 72 65 70 72 6f 63 | 65 73 73 65 64 20 6f 75 | preproc|essed ou|
|00001230| 74 70 75 74 2e 20 20 31 | 20 6d 65 61 6e 73 20 6a |tput. 1| means j|
|00001240| 75 73 74 20 74 68 65 20 | 23 69 6e 63 6c 75 64 65 |ust the |#include|
|00001250| 20 22 2e 2e 2e 22 2c 0d | 20 20 20 32 20 6d 65 61 | "...",.| 2 mea|
|00001260| 6e 73 20 23 69 6e 63 6c | 75 64 65 20 3c 2e 2e 2e |ns #incl|ude <...|
|00001270| 3e 20 61 73 20 77 65 6c | 6c 2e 20 20 2a 2f 0d 0d |> as wel|l. */..|
|00001280| 69 6e 74 20 70 72 69 6e | 74 5f 64 65 70 73 20 3d |int prin|t_deps =|
|00001290| 20 30 3b 0d 0d 2f 2a 20 | 4e 6f 6e 7a 65 72 6f 20 | 0;../* |Nonzero |
|000012a0| 6d 65 61 6e 73 20 64 6f | 6e 27 74 20 6f 75 74 70 |means do|n't outp|
|000012b0| 75 74 20 6c 69 6e 65 20 | 6e 75 6d 62 65 72 20 69 |ut line |number i|
|000012c0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2e 20 20 2a 2f 0d |nformati|on. */.|
|000012d0| 0d 69 6e 74 20 6e 6f 5f | 6c 69 6e 65 5f 63 6f 6d |.int no_|line_com|
|000012e0| 6d 61 6e 64 73 3b 0d 0d | 2f 2a 20 4e 6f 6e 7a 65 |mands;..|/* Nonze|
|000012f0| 72 6f 20 6d 65 61 6e 73 | 20 69 6e 68 69 62 69 74 |ro means| inhibit|
|00001300| 20 6f 75 74 70 75 74 20 | 6f 66 20 74 68 65 20 70 | output |of the p|
|00001310| 72 65 70 72 6f 63 65 73 | 73 65 64 20 74 65 78 74 |reproces|sed text|
|00001320| 0d 20 20 20 61 6e 64 20 | 69 6e 73 74 65 61 64 20 |. and |instead |
|00001330| 6f 75 74 70 75 74 20 74 | 68 65 20 64 65 66 69 6e |output t|he defin|
|00001340| 69 74 69 6f 6e 73 20 6f | 66 20 61 6c 6c 20 75 73 |itions o|f all us|
|00001350| 65 72 2d 64 65 66 69 6e | 65 64 20 6d 61 63 72 6f |er-defin|ed macro|
|00001360| 73 0d 20 20 20 69 6e 20 | 61 20 66 6f 72 6d 20 73 |s. in |a form s|
|00001370| 75 69 74 61 62 6c 65 20 | 66 6f 72 20 75 73 65 20 |uitable |for use |
|00001380| 61 73 20 69 6e 70 75 74 | 20 74 6f 20 63 63 63 70 |as input| to cccp|
|00001390| 2e 20 20 2a 2f 0d 0d 69 | 6e 74 20 64 75 6d 70 5f |. */..i|nt dump_|
|000013a0| 6d 61 63 72 6f 73 3b 0d | 0d 2f 2a 20 4e 6f 6e 7a |macros;.|./* Nonz|
|000013b0| 65 72 6f 20 6d 65 61 6e | 73 20 67 69 76 65 20 61 |ero mean|s give a|
|000013c0| 6c 6c 20 74 68 65 20 65 | 72 72 6f 72 20 6d 65 73 |ll the e|rror mes|
|000013d0| 73 61 67 65 73 20 74 68 | 65 20 41 4e 53 49 20 73 |sages th|e ANSI s|
|000013e0| 74 61 6e 64 61 72 64 20 | 72 65 71 75 69 72 65 73 |tandard |requires|
|000013f0| 2e 20 20 2a 2f 0d 0d 69 | 6e 74 20 70 65 64 61 6e |. */..i|nt pedan|
|00001400| 74 69 63 3b 0d 0d 2f 2a | 20 4e 6f 6e 7a 65 72 6f |tic;../*| Nonzero|
|00001410| 20 6d 65 61 6e 73 20 77 | 61 72 6e 20 69 66 20 73 | means w|arn if s|
|00001420| 6c 61 73 68 2d 73 74 61 | 72 20 61 70 70 65 61 72 |lash-sta|r appear|
|00001430| 73 20 69 6e 20 61 20 63 | 6f 6d 6d 65 6e 74 2e 20 |s in a c|omment. |
|00001440| 20 2a 2f 0d 0d 69 6e 74 | 20 77 61 72 6e 5f 63 6f | */..int| warn_co|
|00001450| 6d 6d 65 6e 74 73 3b 0d | 0d 2f 2a 20 4e 6f 6e 7a |mments;.|./* Nonz|
|00001460| 65 72 6f 20 6d 65 61 6e | 73 20 77 61 72 6e 20 69 |ero mean|s warn i|
|00001470| 66 20 74 68 65 72 65 20 | 61 72 65 20 61 6e 79 20 |f there |are any |
|00001480| 74 72 69 67 72 61 70 68 | 73 2e 20 20 2a 2f 0d 0d |trigraph|s. */..|
|00001490| 69 6e 74 20 77 61 72 6e | 5f 74 72 69 67 72 61 70 |int warn|_trigrap|
|000014a0| 68 73 3b 0d 0d 2f 2a 20 | 4e 6f 6e 7a 65 72 6f 20 |hs;../* |Nonzero |
|000014b0| 6d 65 61 6e 73 20 74 72 | 79 20 74 6f 20 69 6d 69 |means tr|y to imi|
|000014c0| 74 61 74 65 20 6f 6c 64 | 20 66 61 73 68 69 6f 6e |tate old| fashion|
|000014d0| 65 64 20 6e 6f 6e 2d 41 | 4e 53 49 20 70 72 65 70 |ed non-A|NSI prep|
|000014e0| 72 6f 63 65 73 73 6f 72 | 2e 20 20 2a 2f 0d 0d 69 |rocessor|. */..i|
|000014f0| 6e 74 20 74 72 61 64 69 | 74 69 6f 6e 61 6c 3b 0d |nt tradi|tional;.|
|00001500| 0d 2f 2a 20 4e 6f 6e 7a | 65 72 6f 20 63 61 75 73 |./* Nonz|ero caus|
|00001510| 65 73 20 6f 75 74 70 75 | 74 20 6e 6f 74 20 74 6f |es outpu|t not to|
|00001520| 20 62 65 20 64 6f 6e 65 | 2c 0d 20 20 20 62 75 74 | be done|,. but|
|00001530| 20 64 69 72 65 63 74 69 | 76 65 73 20 73 75 63 68 | directi|ves such|
|00001540| 20 61 73 20 23 64 65 66 | 69 6e 65 20 74 68 61 74 | as #def|ine that|
|00001550| 20 68 61 76 65 20 73 69 | 64 65 20 65 66 66 65 63 | have si|de effec|
|00001560| 74 73 0d 20 20 20 61 72 | 65 20 73 74 69 6c 6c 20 |ts. ar|e still |
|00001570| 6f 62 65 79 65 64 2e 20 | 20 2a 2f 0d 0d 69 6e 74 |obeyed. | */..int|
|00001580| 20 6e 6f 5f 6f 75 74 70 | 75 74 3b 0d 0c 0d 2f 2a | no_outp|ut;.../*|
|00001590| 20 49 2f 4f 20 62 75 66 | 66 65 72 20 73 74 72 75 | I/O buf|fer stru|
|000015a0| 63 74 75 72 65 2e 0d 20 | 20 20 54 68 65 20 60 66 |cture.. | The `f|
|000015b0| 6e 61 6d 65 27 20 66 69 | 65 6c 64 20 69 73 20 6e |name' fi|eld is n|
|000015c0| 6f 6e 7a 65 72 6f 20 66 | 6f 72 20 73 6f 75 72 63 |onzero f|or sourc|
|000015d0| 65 20 66 69 6c 65 73 20 | 61 6e 64 20 23 69 6e 63 |e files |and #inc|
|000015e0| 6c 75 64 65 20 66 69 6c | 65 73 0d 20 20 20 61 6e |lude fil|es. an|
|000015f0| 64 20 66 6f 72 20 74 68 | 65 20 64 75 6d 6d 79 20 |d for th|e dummy |
|00001600| 74 65 78 74 20 75 73 65 | 64 20 66 6f 72 20 2d 44 |text use|d for -D|
|00001610| 20 61 6e 64 20 2d 55 2e | 0d 20 20 20 49 74 20 69 | and -U.|. It i|
|00001620| 73 20 7a 65 72 6f 20 66 | 6f 72 20 72 65 73 63 61 |s zero f|or resca|
|00001630| 6e 6e 69 6e 67 20 72 65 | 73 75 6c 74 73 20 6f 66 |nning re|sults of|
|00001640| 20 6d 61 63 72 6f 20 65 | 78 70 61 6e 73 69 6f 6e | macro e|xpansion|
|00001650| 0d 20 20 20 61 6e 64 20 | 66 6f 72 20 65 78 70 61 |. and |for expa|
|00001660| 6e 64 69 6e 67 20 6d 61 | 63 72 6f 20 61 72 67 75 |nding ma|cro argu|
|00001670| 6d 65 6e 74 73 2e 20 20 | 2a 2f 0d 23 64 65 66 69 |ments. |*/.#defi|
|00001680| 6e 65 20 49 4e 50 55 54 | 5f 53 54 41 43 4b 5f 4d |ne INPUT|_STACK_M|
|00001690| 41 58 20 32 30 30 0d 73 | 74 72 75 63 74 20 66 69 |AX 200.s|truct fi|
|000016a0| 6c 65 5f 62 75 66 20 7b | 0d 20 20 63 68 61 72 20 |le_buf {|. char |
|000016b0| 2a 66 6e 61 6d 65 3b 0d | 20 20 69 6e 74 20 6c 69 |*fname;.| int li|
|000016c0| 6e 65 6e 6f 3b 0d 20 20 | 69 6e 74 20 6c 65 6e 67 |neno;. |int leng|
|000016d0| 74 68 3b 0d 20 20 55 5f | 43 48 41 52 20 2a 62 75 |th;. U_|CHAR *bu|
|000016e0| 66 3b 0d 20 20 55 5f 43 | 48 41 52 20 2a 62 75 66 |f;. U_C|HAR *buf|
|000016f0| 70 3b 0d 20 20 2f 2a 20 | 4d 61 63 72 6f 20 74 68 |p;. /* |Macro th|
|00001700| 61 74 20 74 68 69 73 20 | 6c 65 76 65 6c 20 69 73 |at this |level is|
|00001710| 20 74 68 65 20 65 78 70 | 61 6e 73 69 6f 6e 20 6f | the exp|ansion o|
|00001720| 66 2e 0d 20 20 20 20 20 | 49 6e 63 6c 75 64 65 64 |f.. |Included|
|00001730| 20 73 6f 20 74 68 61 74 | 20 77 65 20 63 61 6e 20 | so that| we can |
|00001740| 72 65 65 6e 61 62 6c 65 | 20 74 68 65 20 6d 61 63 |reenable| the mac|
|00001750| 72 6f 0d 20 20 20 20 20 | 61 74 20 74 68 65 20 65 |ro. |at the e|
|00001760| 6e 64 20 6f 66 20 74 68 | 69 73 20 6c 65 76 65 6c |nd of th|is level|
|00001770| 2e 20 20 2a 2f 0d 20 20 | 73 74 72 75 63 74 20 68 |. */. |struct h|
|00001780| 61 73 68 6e 6f 64 65 20 | 2a 6d 61 63 72 6f 3b 0d |ashnode |*macro;.|
|00001790| 20 20 2f 2a 20 56 61 6c | 75 65 20 6f 66 20 69 66 | /* Val|ue of if|
|000017a0| 5f 73 74 61 63 6b 20 61 | 74 20 73 74 61 72 74 20 |_stack a|t start |
|000017b0| 6f 66 20 74 68 69 73 20 | 66 69 6c 65 2e 0d 20 20 |of this |file.. |
|000017c0| 20 20 20 55 73 65 64 20 | 74 6f 20 70 72 6f 68 69 | Used |to prohi|
|000017d0| 62 69 74 20 75 6e 6d 61 | 74 63 68 65 64 20 23 65 |bit unma|tched #e|
|000017e0| 6e 64 69 66 20 28 65 74 | 63 29 20 69 6e 20 61 6e |ndif (et|c) in an|
|000017f0| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 2e 20 20 | include| file. |
|00001800| 2a 2f 0d 20 20 73 74 72 | 75 63 74 20 69 66 5f 73 |*/. str|uct if_s|
|00001810| 74 61 63 6b 20 2a 69 66 | 5f 73 74 61 63 6b 3b 0d |tack *if|_stack;.|
|00001820| 20 20 2f 2a 20 4f 62 6a | 65 63 74 20 74 6f 20 62 | /* Obj|ect to b|
|00001830| 65 20 66 72 65 65 64 20 | 61 74 20 65 6e 64 20 6f |e freed |at end o|
|00001840| 66 20 69 6e 70 75 74 20 | 61 74 20 74 68 69 73 20 |f input |at this |
|00001850| 6c 65 76 65 6c 2e 20 20 | 2a 2f 0d 20 20 55 5f 43 |level. |*/. U_C|
|00001860| 48 41 52 20 2a 66 72 65 | 65 5f 70 74 72 3b 0d 7d |HAR *fre|e_ptr;.}|
|00001870| 20 69 6e 73 74 61 63 6b | 5b 49 4e 50 55 54 5f 53 | instack|[INPUT_S|
|00001880| 54 41 43 4b 5f 4d 41 58 | 5d 3b 0d 0d 2f 2a 20 43 |TACK_MAX|];../* C|
|00001890| 75 72 72 65 6e 74 20 6e | 65 73 74 69 6e 67 20 6c |urrent n|esting l|
|000018a0| 65 76 65 6c 20 6f 66 20 | 69 6e 70 75 74 20 73 6f |evel of |input so|
|000018b0| 75 72 63 65 73 2e 0d 20 | 20 20 60 69 6e 73 74 61 |urces.. | `insta|
|000018c0| 63 6b 5b 69 6e 64 65 70 | 74 68 5d 27 20 69 73 20 |ck[indep|th]' is |
|000018d0| 74 68 65 20 6c 65 76 65 | 6c 20 63 75 72 72 65 6e |the leve|l curren|
|000018e0| 74 6c 79 20 62 65 69 6e | 67 20 72 65 61 64 2e 20 |tly bein|g read. |
|000018f0| 20 2a 2f 0d 69 6e 74 20 | 69 6e 64 65 70 74 68 20 | */.int |indepth |
|00001900| 3d 20 2d 31 3b 0d 23 64 | 65 66 69 6e 65 20 43 48 |= -1;.#d|efine CH|
|00001910| 45 43 4b 5f 44 45 50 54 | 48 28 63 6f 64 65 29 20 |ECK_DEPT|H(code) |
|00001920| 5c 0d 20 20 69 66 20 28 | 69 6e 64 65 70 74 68 20 |\. if (|indepth |
|00001930| 3e 3d 20 28 49 4e 50 55 | 54 5f 53 54 41 43 4b 5f |>= (INPU|T_STACK_|
|00001940| 4d 41 58 20 2d 20 31 29 | 29 09 09 09 09 09 5c 0d |MAX - 1)|).....\.|
|00001950| 20 20 20 20 7b 09 09 09 | 09 09 09 09 09 09 5c 0d | {...|......\.|
|00001960| 20 20 20 20 20 20 65 72 | 72 6f 72 5f 77 69 74 68 | er|ror_with|
|00001970| 5f 6c 69 6e 65 20 28 6c | 69 6e 65 5f 66 6f 72 5f |_line (l|ine_for_|
|00001980| 65 72 72 6f 72 20 28 69 | 6e 73 74 61 63 6b 5b 69 |error (i|nstack[i|
|00001990| 6e 64 65 70 74 68 5d 2e | 6c 69 6e 65 6e 6f 29 2c |ndepth].|lineno),|
|000019a0| 09 5c 0d 09 09 20 20 20 | 20 20 20 20 22 6d 61 63 |.\... | "mac|
|000019b0| 72 6f 20 6f 72 20 23 69 | 6e 63 6c 75 64 65 20 72 |ro or #i|nclude r|
|000019c0| 65 63 75 72 73 69 6f 6e | 20 74 6f 6f 20 64 65 65 |ecursion| too dee|
|000019d0| 70 22 29 3b 09 09 5c 0d | 20 20 20 20 20 20 63 6f |p");..\.| co|
|000019e0| 64 65 3b 09 09 09 09 09 | 09 09 09 5c 0d 20 20 20 |de;.....|...\. |
|000019f0| 20 7d 0d 0d 2f 2a 20 43 | 75 72 72 65 6e 74 20 64 | }../* C|urrent d|
|00001a00| 65 70 74 68 20 69 6e 20 | 23 69 6e 63 6c 75 64 65 |epth in |#include|
|00001a10| 20 64 69 72 65 63 74 69 | 76 65 73 20 74 68 61 74 | directi|ves that|
|00001a20| 20 75 73 65 20 3c 2e 2e | 2e 3e 2e 20 20 2a 2f 0d | use <..|.>. */.|
|00001a30| 69 6e 74 20 73 79 73 74 | 65 6d 5f 69 6e 63 6c 75 |int syst|em_inclu|
|00001a40| 64 65 5f 64 65 70 74 68 | 20 3d 20 30 3b 0d 0d 74 |de_depth| = 0;..t|
|00001a50| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 20 66 69 |ypedef s|truct fi|
|00001a60| 6c 65 5f 62 75 66 20 46 | 49 4c 45 5f 42 55 46 3b |le_buf F|ILE_BUF;|
|00001a70| 0d 0d 2f 2a 20 54 68 65 | 20 6f 75 74 70 75 74 20 |../* The| output |
|00001a80| 62 75 66 66 65 72 2e 20 | 20 49 74 73 20 4c 45 4e |buffer. | Its LEN|
|00001a90| 47 54 48 20 66 69 65 6c | 64 20 69 73 20 74 68 65 |GTH fiel|d is the|
|00001aa0| 20 61 6d 6f 75 6e 74 20 | 6f 66 20 72 6f 6f 6d 20 | amount |of room |
|00001ab0| 61 6c 6c 6f 63 61 74 65 | 64 0d 20 20 20 66 6f 72 |allocate|d. for|
|00001ac0| 20 74 68 65 20 62 75 66 | 66 65 72 2c 20 6e 6f 74 | the buf|fer, not|
|00001ad0| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 63 | the num|ber of c|
|00001ae0| 68 61 72 73 20 61 63 74 | 75 61 6c 6c 79 20 70 72 |hars act|ually pr|
|00001af0| 65 73 65 6e 74 2e 20 20 | 54 6f 20 67 65 74 0d 20 |esent. |To get. |
|00001b00| 20 20 74 68 61 74 2c 20 | 73 75 62 74 72 61 63 74 | that, |subtract|
|00001b10| 20 6f 75 74 62 75 66 2e | 62 75 66 20 66 72 6f 6d | outbuf.|buf from|
|00001b20| 20 6f 75 74 62 75 66 2e | 62 75 66 70 2e 20 2a 2f | outbuf.|bufp. */|
|00001b30| 0d 0d 23 64 65 66 69 6e | 65 20 4f 55 54 42 55 46 |..#defin|e OUTBUF|
|00001b40| 5f 53 49 5a 45 20 31 30 | 09 2f 2a 20 69 6e 69 74 |_SIZE 10|./* init|
|00001b50| 69 61 6c 20 73 69 7a 65 | 20 6f 66 20 6f 75 74 70 |ial size| of outp|
|00001b60| 75 74 20 62 75 66 66 65 | 72 20 2a 2f 0d 46 49 4c |ut buffe|r */.FIL|
|00001b70| 45 5f 42 55 46 20 6f 75 | 74 62 75 66 3b 0d 0d 2f |E_BUF ou|tbuf;../|
|00001b80| 2a 20 47 72 6f 77 20 6f | 75 74 70 75 74 20 62 75 |* Grow o|utput bu|
|00001b90| 66 66 65 72 20 4f 42 55 | 46 20 70 6f 69 6e 74 73 |ffer OBU|F points|
|00001ba0| 20 61 74 0d 20 20 20 73 | 6f 20 69 74 20 63 61 6e | at. s|o it can|
|00001bb0| 20 68 6f 6c 64 20 61 74 | 20 6c 65 61 73 74 20 4e | hold at| least N|
|00001bc0| 45 45 44 45 44 20 6d 6f | 72 65 20 63 68 61 72 73 |EEDED mo|re chars|
|00001bd0| 2e 20 20 2a 2f 0d 0d 23 | 64 65 66 69 6e 65 20 63 |. */..#|define c|
|00001be0| 68 65 63 6b 5f 65 78 70 | 61 6e 64 28 4f 42 55 46 |heck_exp|and(OBUF|
|00001bf0| 2c 20 4e 45 45 44 45 44 | 29 20 20 5c 0d 20 20 28 |, NEEDED|) \. (|
|00001c00| 28 28 4f 42 55 46 29 2d | 3e 6c 65 6e 67 74 68 20 |((OBUF)-|>length |
|00001c10| 2d 20 28 28 4f 42 55 46 | 29 2d 3e 62 75 66 70 20 |- ((OBUF|)->bufp |
|00001c20| 2d 20 28 4f 42 55 46 29 | 2d 3e 62 75 66 29 20 3c |- (OBUF)|->buf) <|
|00001c30| 3d 20 28 4e 45 45 44 45 | 44 29 29 20 20 20 5c 0d |= (NEEDE|D)) \.|
|00001c40| 20 20 20 3f 20 67 72 6f | 77 5f 6f 75 74 62 75 66 | ? gro|w_outbuf|
|00001c50| 20 28 28 4f 42 55 46 29 | 2c 20 28 4e 45 45 44 45 | ((OBUF)|, (NEEDE|
|00001c60| 44 29 29 20 3a 20 30 29 | 0d 0d 73 74 72 75 63 74 |D)) : 0)|..struct|
|00001c70| 20 66 69 6c 65 5f 6e 61 | 6d 65 5f 6c 69 73 74 0d | file_na|me_list.|
|00001c80| 20 20 7b 0d 20 20 20 20 | 73 74 72 75 63 74 20 66 | {. |struct f|
|00001c90| 69 6c 65 5f 6e 61 6d 65 | 5f 6c 69 73 74 20 2a 6e |ile_name|_list *n|
|00001ca0| 65 78 74 3b 0d 20 20 20 | 20 63 68 61 72 20 2a 66 |ext;. | char *f|
|00001cb0| 6e 61 6d 65 3b 0d 20 20 | 7d 3b 0d 0d 2f 2a 20 23 |name;. |};../* #|
|00001cc0| 69 6e 63 6c 75 64 65 20 | 22 66 69 6c 65 22 20 6c |include |"file" l|
|00001cd0| 6f 6f 6b 73 20 69 6e 20 | 73 6f 75 72 63 65 20 66 |ooks in |source f|
|00001ce0| 69 6c 65 20 64 69 72 2c | 20 74 68 65 6e 20 73 74 |ile dir,| then st|
|00001cf0| 61 63 6b 2e 20 2a 2f 0d | 2f 2a 20 23 69 6e 63 6c |ack. */.|/* #incl|
|00001d00| 75 64 65 20 3c 66 69 6c | 65 3e 20 6a 75 73 74 20 |ude <fil|e> just |
|00001d10| 6c 6f 6f 6b 73 20 69 6e | 20 74 68 65 20 73 74 61 |looks in| the sta|
|00001d20| 63 6b 2e 20 2a 2f 0d 2f | 2a 20 2d 49 20 64 69 72 |ck. */./|* -I dir|
|00001d30| 65 63 74 6f 72 69 65 73 | 20 61 72 65 20 61 64 64 |ectories| are add|
|00001d40| 65 64 20 74 6f 20 74 68 | 65 20 65 6e 64 2c 20 74 |ed to th|e end, t|
|00001d50| 68 65 6e 20 74 68 65 20 | 64 65 66 61 75 6c 74 73 |hen the |defaults|
|00001d60| 20 61 72 65 20 61 64 64 | 65 64 2e 20 2a 2f 0d 73 | are add|ed. */.s|
|00001d70| 74 72 75 63 74 20 66 69 | 6c 65 5f 6e 61 6d 65 5f |truct fi|le_name_|
|00001d80| 6c 69 73 74 20 69 6e 63 | 6c 75 64 65 5f 64 65 66 |list inc|lude_def|
|00001d90| 61 75 6c 74 73 5b 5d 20 | 3d 0d 20 20 7b 0d 23 69 |aults[] |=. {.#i|
|00001da0| 66 64 65 66 20 4d 50 57 | 0d 20 20 20 20 2f 2a 20 |fdef MPW|. /* |
|00001db0| 4d 50 57 20 68 61 73 20 | 6e 6f 20 62 75 69 6c 74 |MPW has |no built|
|00001dc0| 69 6e 20 64 65 66 61 75 | 6c 74 73 20 66 6f 72 20 |in defau|lts for |
|00001dd0| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 73 2e 20 2a |include |files. *|
|00001de0| 2f 0d 20 20 20 20 7b 20 | 30 2c 20 22 22 20 7d 0d |/. { |0, "" }.|
|00001df0| 23 65 6c 73 65 20 2f 2a | 20 6e 6f 74 20 4d 50 57 |#else /*| not MPW|
|00001e00| 20 2a 2f 0d 23 69 66 6e | 64 65 66 20 56 4d 53 0d | */.#ifn|def VMS.|
|00001e10| 20 20 20 20 7b 20 26 69 | 6e 63 6c 75 64 65 5f 64 | { &i|nclude_d|
|00001e20| 65 66 61 75 6c 74 73 5b | 31 5d 2c 20 47 43 43 5f |efaults[|1], GCC_|
|00001e30| 49 4e 43 4c 55 44 45 5f | 44 49 52 20 7d 2c 0d 20 |INCLUDE_|DIR },. |
|00001e40| 20 20 20 7b 20 26 69 6e | 63 6c 75 64 65 5f 64 65 | { &in|clude_de|
|00001e50| 66 61 75 6c 74 73 5b 32 | 5d 2c 20 22 2f 75 73 72 |faults[2|], "/usr|
|00001e60| 2f 69 6e 63 6c 75 64 65 | 22 20 7d 2c 0d 20 20 20 |/include|" },. |
|00001e70| 20 7b 20 30 2c 20 22 2f | 75 73 72 2f 6c 6f 63 61 | { 0, "/|usr/loca|
|00001e80| 6c 2f 69 6e 63 6c 75 64 | 65 22 20 7d 0d 23 65 6c |l/includ|e" }.#el|
|00001e90| 73 65 0d 20 20 20 20 7b | 20 26 69 6e 63 6c 75 64 |se. {| &includ|
|00001ea0| 65 5f 64 65 66 61 75 6c | 74 73 5b 31 5d 2c 20 22 |e_defaul|ts[1], "|
|00001eb0| 47 4e 55 5f 43 43 5f 49 | 4e 43 4c 55 44 45 3a 22 |GNU_CC_I|NCLUDE:"|
|00001ec0| 20 7d 2c 20 20 20 20 20 | 20 20 2f 2a 20 47 4e 55 | }, | /* GNU|
|00001ed0| 20 69 6e 63 6c 75 64 65 | 73 20 2a 2f 0d 20 20 20 | include|s */. |
|00001ee0| 20 7b 20 26 69 6e 63 6c | 75 64 65 5f 64 65 66 61 | { &incl|ude_defa|
|00001ef0| 75 6c 74 73 5b 32 5d 2c | 20 22 53 59 53 24 53 59 |ults[2],| "SYS$SY|
|00001f00| 53 52 4f 4f 54 3a 5b 53 | 59 53 4c 49 42 2e 5d 22 |SROOT:[S|YSLIB.]"|
|00001f10| 20 7d 2c 20 2f 2a 20 56 | 41 58 2d 31 31 20 22 43 | }, /* V|AX-11 "C|
|00001f20| 22 20 69 6e 63 6c 75 64 | 65 73 20 2a 2f 0d 20 20 |" includ|es */. |
|00001f30| 20 20 7b 20 30 2c 20 22 | 22 20 7d 2c 09 2f 2a 20 | { 0, "|" },./* |
|00001f40| 54 68 69 73 20 6d 61 6b | 65 73 20 6e 6f 72 6d 61 |This mak|es norma|
|00001f50| 6c 20 56 4d 53 20 66 69 | 6c 65 73 70 65 63 73 20 |l VMS fi|lespecs |
|00001f60| 77 6f 72 6b 20 4f 4b 20 | 2a 2f 0d 23 65 6e 64 69 |work OK |*/.#endi|
|00001f70| 66 20 2f 2a 20 56 4d 53 | 20 2a 2f 0d 23 65 6e 64 |f /* VMS| */.#end|
|00001f80| 69 66 20 2f 2a 20 4d 50 | 57 20 2a 2f 0d 20 20 7d |if /* MP|W */. }|
|00001f90| 3b 0d 0d 2f 2a 20 54 68 | 65 73 65 20 61 72 65 20 |;../* Th|ese are |
|00001fa0| 75 73 65 64 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |used ins|tead of |
|00001fb0| 74 68 65 20 61 62 6f 76 | 65 2c 20 66 6f 72 20 43 |the abov|e, for C|
|00001fc0| 2b 2b 2e 20 20 2a 2f 0d | 73 74 72 75 63 74 20 66 |++. */.|struct f|
|00001fd0| 69 6c 65 5f 6e 61 6d 65 | 5f 6c 69 73 74 20 63 70 |ile_name|_list cp|
|00001fe0| 6c 75 73 70 6c 75 73 5f | 69 6e 63 6c 75 64 65 5f |lusplus_|include_|
|00001ff0| 64 65 66 61 75 6c 74 73 | 5b 5d 20 3d 0d 20 20 7b |defaults|[] =. {|
|00002000| 0d 23 69 66 64 65 66 20 | 4d 50 57 0d 20 20 20 20 |.#ifdef |MPW. |
|00002010| 2f 2a 20 4d 50 57 20 68 | 61 73 20 6e 6f 20 62 75 |/* MPW h|as no bu|
|00002020| 69 6c 74 69 6e 20 64 65 | 66 61 75 6c 74 73 2e 20 |iltin de|faults. |
|00002030| 2a 2f 0d 20 20 20 20 7b | 20 30 2c 20 22 22 20 7d |*/. {| 0, "" }|
|00002040| 0d 23 65 6c 73 65 20 2f | 2a 20 6e 6f 74 20 4d 50 |.#else /|* not MP|
|00002050| 57 20 2a 2f 0d 23 69 66 | 6e 64 65 66 20 56 4d 53 |W */.#if|ndef VMS|
|00002060| 0d 20 20 20 20 2f 2a 20 | 50 69 63 6b 20 75 70 20 |. /* |Pick up |
|00002070| 47 4e 55 20 43 2b 2b 20 | 73 70 65 63 69 66 69 63 |GNU C++ |specific|
|00002080| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 73 2e 20 | include| files. |
|00002090| 20 2a 2f 0d 20 20 20 20 | 7b 20 26 63 70 6c 75 73 | */. |{ &cplus|
|000020a0| 70 6c 75 73 5f 69 6e 63 | 6c 75 64 65 5f 64 65 66 |plus_inc|lude_def|
|000020b0| 61 75 6c 74 73 5b 31 5d | 2c 20 47 50 4c 55 53 50 |aults[1]|, GPLUSP|
|000020c0| 4c 55 53 5f 49 4e 43 4c | 55 44 45 5f 44 49 52 20 |LUS_INCL|UDE_DIR |
|000020d0| 7d 2c 0d 20 20 20 20 2f | 2a 20 55 73 65 20 47 4e |},. /|* Use GN|
|000020e0| 55 20 43 43 20 73 70 65 | 63 69 66 69 63 20 68 65 |U CC spe|cific he|
|000020f0| 61 64 65 72 20 66 69 6c | 65 73 2e 20 20 2a 2f 0d |ader fil|es. */.|
|00002100| 20 20 20 20 7b 20 26 63 | 70 6c 75 73 70 6c 75 73 | { &c|plusplus|
|00002110| 5f 69 6e 63 6c 75 64 65 | 5f 64 65 66 61 75 6c 74 |_include|_default|
|00002120| 73 5b 32 5d 2c 20 47 43 | 43 5f 49 4e 43 4c 55 44 |s[2], GC|C_INCLUD|
|00002130| 45 5f 44 49 52 20 7d 2c | 0d 20 20 20 20 7b 20 30 |E_DIR },|. { 0|
|00002140| 2c 20 22 2f 75 73 72 2f | 69 6e 63 6c 75 64 65 22 |, "/usr/|include"|
|00002150| 20 7d 0d 23 65 6c 73 65 | 0d 20 20 20 20 7b 20 26 | }.#else|. { &|
|00002160| 63 70 6c 75 73 70 6c 75 | 73 5f 69 6e 63 6c 75 64 |cplusplu|s_includ|
|00002170| 65 5f 64 65 66 61 75 6c | 74 73 5b 31 5d 2c 20 22 |e_defaul|ts[1], "|
|00002180| 47 4e 55 5f 47 58 58 5f | 49 4e 43 4c 55 44 45 3a |GNU_GXX_|INCLUDE:|
|00002190| 22 20 7d 2c 0d 20 20 20 | 20 7b 20 26 63 70 6c 75 |" },. | { &cplu|
|000021a0| 73 70 6c 75 73 5f 69 6e | 63 6c 75 64 65 5f 64 65 |splus_in|clude_de|
|000021b0| 66 61 75 6c 74 73 5b 32 | 5d 2c 20 22 47 4e 55 5f |faults[2|], "GNU_|
|000021c0| 43 43 5f 49 4e 43 4c 55 | 44 45 3a 22 20 7d 2c 0d |CC_INCLU|DE:" },.|
|000021d0| 20 20 20 20 2f 2a 20 56 | 41 58 2d 31 31 20 43 20 | /* V|AX-11 C |
|000021e0| 69 6e 63 6c 75 64 65 73 | 20 2a 2f 0d 20 20 20 20 |includes| */. |
|000021f0| 7b 20 26 63 70 6c 75 73 | 70 6c 75 73 5f 69 6e 63 |{ &cplus|plus_inc|
|00002200| 6c 75 64 65 5f 64 65 66 | 61 75 6c 74 73 5b 33 5d |lude_def|aults[3]|
|00002210| 2c 20 22 53 59 53 24 53 | 59 53 52 4f 4f 54 3a 5b |, "SYS$S|YSROOT:[|
|00002220| 53 59 53 4c 49 42 2e 5d | 22 20 7d 2c 0d 20 20 20 |SYSLIB.]|" },. |
|00002230| 20 7b 20 30 2c 20 22 22 | 20 7d 2c 09 2f 2a 20 54 | { 0, ""| },./* T|
|00002240| 68 69 73 20 6d 61 6b 65 | 73 20 6e 6f 72 6d 61 6c |his make|s normal|
|00002250| 20 56 4d 53 20 66 69 6c | 65 73 70 65 63 73 20 77 | VMS fil|especs w|
|00002260| 6f 72 6b 20 4f 4b 20 2a | 2f 0d 23 65 6e 64 69 66 |ork OK *|/.#endif|
|00002270| 20 2f 2a 20 56 4d 53 20 | 2a 2f 0d 23 65 6e 64 69 | /* VMS |*/.#endi|
|00002280| 66 20 2f 2a 20 4d 50 57 | 20 2a 2f 0d 20 20 7d 3b |f /* MPW| */. };|
|00002290| 0d 0d 73 74 72 75 63 74 | 20 66 69 6c 65 5f 6e 61 |..struct| file_na|
|000022a0| 6d 65 5f 6c 69 73 74 20 | 2a 69 6e 63 6c 75 64 65 |me_list |*include|
|000022b0| 20 3d 20 30 3b 09 2f 2a | 20 46 69 72 73 74 20 64 | = 0;./*| First d|
|000022c0| 69 72 20 74 6f 20 73 65 | 61 72 63 68 20 2a 2f 0d |ir to se|arch */.|
|000022d0| 09 2f 2a 20 46 69 72 73 | 74 20 64 69 72 20 74 6f |./* Firs|t dir to|
|000022e0| 20 73 65 61 72 63 68 20 | 66 6f 72 20 3c 66 69 6c | search |for <fil|
|000022f0| 65 3e 20 2a 2f 0d 73 74 | 72 75 63 74 20 66 69 6c |e> */.st|ruct fil|
|00002300| 65 5f 6e 61 6d 65 5f 6c | 69 73 74 20 2a 66 69 72 |e_name_l|ist *fir|
|00002310| 73 74 5f 62 72 61 63 6b | 65 74 5f 69 6e 63 6c 75 |st_brack|et_inclu|
|00002320| 64 65 20 3d 20 30 3b 0d | 73 74 72 75 63 74 20 66 |de = 0;.|struct f|
|00002330| 69 6c 65 5f 6e 61 6d 65 | 5f 6c 69 73 74 20 2a 6c |ile_name|_list *l|
|00002340| 61 73 74 5f 69 6e 63 6c | 75 64 65 20 3d 20 30 3b |ast_incl|ude = 0;|
|00002350| 09 2f 2a 20 4c 61 73 74 | 20 69 6e 20 63 68 61 69 |./* Last| in chai|
|00002360| 6e 20 2a 2f 0d 0d 2f 2a | 20 4c 69 73 74 20 6f 66 |n */../*| List of|
|00002370| 20 69 6e 63 6c 75 64 65 | 64 20 66 69 6c 65 73 20 | include|d files |
|00002380| 74 68 61 74 20 63 6f 6e | 74 61 69 6e 65 64 20 23 |that con|tained #|
|00002390| 6f 6e 63 65 2e 20 20 2a | 2f 0d 73 74 72 75 63 74 |once. *|/.struct|
|000023a0| 20 66 69 6c 65 5f 6e 61 | 6d 65 5f 6c 69 73 74 20 | file_na|me_list |
|000023b0| 2a 64 6f 6e 74 5f 72 65 | 70 65 61 74 5f 66 69 6c |*dont_re|peat_fil|
|000023c0| 65 73 20 3d 20 30 3b 0d | 0d 2f 2a 20 4c 69 73 74 |es = 0;.|./* List|
|000023d0| 20 6f 66 20 6f 74 68 65 | 72 20 69 6e 63 6c 75 64 | of othe|r includ|
|000023e0| 65 64 20 66 69 6c 65 73 | 2e 20 20 2a 2f 0d 73 74 |ed files|. */.st|
|000023f0| 72 75 63 74 20 66 69 6c | 65 5f 6e 61 6d 65 5f 6c |ruct fil|e_name_l|
|00002400| 69 73 74 20 2a 61 6c 6c | 5f 69 6e 63 6c 75 64 65 |ist *all|_include|
|00002410| 5f 66 69 6c 65 73 20 3d | 20 30 3b 0d 0c 0d 2f 2a |_files =| 0;.../*|
|00002420| 20 53 74 72 75 63 74 75 | 72 65 20 61 6c 6c 6f 63 | Structu|re alloc|
|00002430| 61 74 65 64 20 66 6f 72 | 20 65 76 65 72 79 20 23 |ated for| every #|
|00002440| 64 65 66 69 6e 65 2e 20 | 20 46 6f 72 20 61 20 73 |define. | For a s|
|00002450| 69 6d 70 6c 65 20 72 65 | 70 6c 61 63 65 6d 65 6e |imple re|placemen|
|00002460| 74 0d 20 20 20 73 75 63 | 68 20 61 73 0d 20 20 20 |t. suc|h as. |
|00002470| 09 23 64 65 66 69 6e 65 | 20 66 6f 6f 20 62 61 72 |.#define| foo bar|
|00002480| 20 2c 0d 20 20 20 6e 61 | 72 67 73 20 3d 20 2d 31 | ,. na|rgs = -1|
|00002490| 2c 20 74 68 65 20 60 70 | 61 74 74 65 72 6e 27 20 |, the `p|attern' |
|000024a0| 6c 69 73 74 20 69 73 20 | 6e 75 6c 6c 2c 20 61 6e |list is |null, an|
|000024b0| 64 20 74 68 65 20 65 78 | 70 61 6e 73 69 6f 6e 20 |d the ex|pansion |
|000024c0| 69 73 20 6a 75 73 74 0d | 20 20 20 74 68 65 20 72 |is just.| the r|
|000024d0| 65 70 6c 61 63 65 6d 65 | 6e 74 20 74 65 78 74 2e |eplaceme|nt text.|
|000024e0| 20 20 4e 61 72 67 73 20 | 3d 20 30 20 6d 65 61 6e | Nargs |= 0 mean|
|000024f0| 73 20 61 20 66 75 6e 63 | 74 69 6f 6e 6c 69 6b 65 |s a func|tionlike|
|00002500| 20 6d 61 63 72 6f 20 77 | 69 74 68 20 6e 6f 20 61 | macro w|ith no a|
|00002510| 72 67 73 2c 0d 20 20 20 | 65 2e 67 2e 2c 0d 20 20 |rgs,. |e.g.,. |
|00002520| 20 20 20 20 20 23 64 65 | 66 69 6e 65 20 67 65 74 | #de|fine get|
|00002530| 63 68 61 72 28 29 20 67 | 65 74 63 20 28 73 74 64 |char() g|etc (std|
|00002540| 69 6e 29 20 2e 0d 20 20 | 20 57 68 65 6e 20 74 68 |in) .. | When th|
|00002550| 65 72 65 20 61 72 65 20 | 61 72 67 73 2c 20 74 68 |ere are |args, th|
|00002560| 65 20 65 78 70 61 6e 73 | 69 6f 6e 20 69 73 20 74 |e expans|ion is t|
|00002570| 68 65 20 72 65 70 6c 61 | 63 65 6d 65 6e 74 20 74 |he repla|cement t|
|00002580| 65 78 74 20 77 69 74 68 | 20 74 68 65 0d 20 20 20 |ext with| the. |
|00002590| 61 72 67 73 20 73 71 75 | 61 73 68 65 64 20 6f 75 |args squ|ashed ou|
|000025a0| 74 2c 20 61 6e 64 20 74 | 68 65 20 72 65 66 6c 69 |t, and t|he refli|
|000025b0| 73 74 20 69 73 20 61 20 | 6c 69 73 74 20 64 65 73 |st is a |list des|
|000025c0| 63 72 69 62 69 6e 67 20 | 68 6f 77 20 74 6f 0d 20 |cribing |how to. |
|000025d0| 20 20 62 75 69 6c 64 20 | 74 68 65 20 6f 75 74 70 | build |the outp|
|000025e0| 75 74 20 66 72 6f 6d 20 | 74 68 65 20 69 6e 70 75 |ut from |the inpu|
|000025f0| 74 3a 20 65 2e 67 2e 2c | 20 22 33 20 63 68 61 72 |t: e.g.,| "3 char|
|00002600| 73 2c 20 74 68 65 6e 20 | 74 68 65 20 31 73 74 20 |s, then |the 1st |
|00002610| 61 72 67 2c 0d 20 20 20 | 74 68 65 6e 20 39 20 63 |arg,. |then 9 c|
|00002620| 68 61 72 73 2c 20 74 68 | 65 6e 20 74 68 65 20 33 |hars, th|en the 3|
|00002630| 72 64 20 61 72 67 2c 20 | 74 68 65 6e 20 30 20 63 |rd arg, |then 0 c|
|00002640| 68 61 72 73 2c 20 74 68 | 65 6e 20 74 68 65 20 32 |hars, th|en the 2|
|00002650| 6e 64 20 61 72 67 22 2e | 0d 20 20 20 54 68 65 20 |nd arg".|. The |
|00002660| 63 68 61 72 73 20 68 65 | 72 65 20 63 6f 6d 65 20 |chars he|re come |
|00002670| 66 72 6f 6d 20 74 68 65 | 20 65 78 70 61 6e 73 69 |from the| expansi|
|00002680| 6f 6e 2e 20 20 57 68 61 | 74 65 76 65 72 20 69 73 |on. Wha|tever is|
|00002690| 20 6c 65 66 74 20 6f 66 | 20 74 68 65 0d 20 20 20 | left of| the. |
|000026a0| 65 78 70 61 6e 73 69 6f | 6e 20 61 66 74 65 72 20 |expansio|n after |
|000026b0| 74 68 65 20 6c 61 73 74 | 20 61 72 67 2d 6f 63 63 |the last| arg-occ|
|000026c0| 75 72 72 65 6e 63 65 20 | 69 73 20 63 6f 70 69 65 |urrence |is copie|
|000026d0| 64 20 61 66 74 65 72 20 | 74 68 61 74 20 61 72 67 |d after |that arg|
|000026e0| 2e 0d 20 20 20 4e 6f 74 | 65 20 74 68 61 74 20 74 |.. Not|e that t|
|000026f0| 68 65 20 72 65 66 6c 69 | 73 74 20 63 61 6e 20 62 |he refli|st can b|
|00002700| 65 20 61 72 62 69 74 72 | 61 72 69 6c 79 20 6c 6f |e arbitr|arily lo|
|00002710| 6e 67 2d 2d 2d 0d 20 20 | 20 69 74 73 20 6c 65 6e |ng---. | its len|
|00002720| 67 74 68 20 64 65 70 65 | 6e 64 73 20 6f 6e 20 74 |gth depe|nds on t|
|00002730| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 69 6d |he numbe|r of tim|
|00002740| 65 73 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 73 |es the a|rguments|
|00002750| 20 61 70 70 65 61 72 20 | 69 6e 0d 20 20 20 74 68 | appear |in. th|
|00002760| 65 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 20 74 65 |e replac|ement te|
|00002770| 78 74 2c 20 6e 6f 74 20 | 68 6f 77 20 6d 61 6e 79 |xt, not |how many|
|00002780| 20 61 72 67 73 20 74 68 | 65 72 65 20 61 72 65 2e | args th|ere are.|
|00002790| 20 20 45 78 61 6d 70 6c | 65 3a 0d 20 20 20 23 64 | Exampl|e:. #d|
|000027a0| 65 66 69 6e 65 20 66 28 | 78 29 20 78 2b 78 2b 78 |efine f(|x) x+x+x|
|000027b0| 2b 78 2b 78 2b 78 2b 78 | 20 77 6f 75 6c 64 20 68 |+x+x+x+x| would h|
|000027c0| 61 76 65 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |ave repl|acement |
|000027d0| 74 65 78 74 20 22 2b 2b | 2b 2b 2b 2b 22 20 61 6e |text "++|++++" an|
|000027e0| 64 0d 20 20 20 70 61 74 | 74 65 72 6e 20 6c 69 73 |d. pat|tern lis|
|000027f0| 74 0d 20 20 20 20 20 7b | 20 28 30 2c 20 31 29 2c |t. {| (0, 1),|
|00002800| 20 28 31 2c 20 31 29 2c | 20 28 31 2c 20 31 29 2c | (1, 1),| (1, 1),|
|00002810| 20 2e 2e 2e 2c 20 28 31 | 2c 20 31 29 2c 20 4e 55 | ..., (1|, 1), NU|
|00002820| 4c 4c 20 7d 0d 20 20 20 | 77 68 65 72 65 20 28 78 |LL }. |where (x|
|00002830| 2c 20 79 29 20 6d 65 61 | 6e 73 20 28 6e 63 68 61 |, y) mea|ns (ncha|
|00002840| 72 73 2c 20 61 72 67 6e | 6f 29 2e 20 2a 2f 0d 0d |rs, argn|o). */..|
|00002850| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 64 |typedef |struct d|
|00002860| 65 66 69 6e 69 74 69 6f | 6e 20 44 45 46 49 4e 49 |efinitio|n DEFINI|
|00002870| 54 49 4f 4e 3b 0d 73 74 | 72 75 63 74 20 64 65 66 |TION;.st|ruct def|
|00002880| 69 6e 69 74 69 6f 6e 20 | 7b 0d 20 20 69 6e 74 20 |inition |{. int |
|00002890| 6e 61 72 67 73 3b 0d 20 | 20 69 6e 74 20 6c 65 6e |nargs;. | int len|
|000028a0| 67 74 68 3b 09 09 09 2f | 2a 20 6c 65 6e 67 74 68 |gth;.../|* length|
|000028b0| 20 6f 66 20 65 78 70 61 | 6e 73 69 6f 6e 20 73 74 | of expa|nsion st|
|000028c0| 72 69 6e 67 20 2a 2f 0d | 20 20 55 5f 43 48 41 52 |ring */.| U_CHAR|
|000028d0| 20 2a 65 78 70 61 6e 73 | 69 6f 6e 3b 0d 20 20 73 | *expans|ion;. s|
|000028e0| 74 72 75 63 74 20 72 65 | 66 6c 69 73 74 20 7b 0d |truct re|flist {.|
|000028f0| 20 20 20 20 73 74 72 75 | 63 74 20 72 65 66 6c 69 | stru|ct refli|
|00002900| 73 74 20 2a 6e 65 78 74 | 3b 0d 20 20 20 20 63 68 |st *next|;. ch|
|00002910| 61 72 20 73 74 72 69 6e | 67 69 66 79 3b 09 09 2f |ar strin|gify;../|
|00002920| 2a 20 6e 6f 6e 7a 65 72 | 6f 20 69 66 20 74 68 69 |* nonzer|o if thi|
|00002930| 73 20 61 72 67 20 77 61 | 73 20 70 72 65 63 65 64 |s arg wa|s preced|
|00002940| 65 64 20 62 79 20 61 0d | 09 09 09 09 20 20 20 23 |ed by a.|.... #|
|00002950| 20 6f 70 65 72 61 74 6f | 72 2e 20 2a 2f 0d 20 20 | operato|r. */. |
|00002960| 20 20 63 68 61 72 20 72 | 61 77 5f 62 65 66 6f 72 | char r|aw_befor|
|00002970| 65 3b 09 09 2f 2a 20 4e | 6f 6e 7a 65 72 6f 20 69 |e;../* N|onzero i|
|00002980| 66 20 61 20 23 23 20 6f | 70 65 72 61 74 6f 72 20 |f a ## o|perator |
|00002990| 62 65 66 6f 72 65 20 61 | 72 67 2e 20 2a 2f 0d 20 |before a|rg. */. |
|000029a0| 20 20 20 63 68 61 72 20 | 72 61 77 5f 61 66 74 65 | char |raw_afte|
|000029b0| 72 3b 09 09 2f 2a 20 4e | 6f 6e 7a 65 72 6f 20 69 |r;../* N|onzero i|
|000029c0| 66 20 61 20 23 23 20 6f | 70 65 72 61 74 6f 72 20 |f a ## o|perator |
|000029d0| 61 66 74 65 72 20 61 72 | 67 2e 20 2a 2f 0d 20 20 |after ar|g. */. |
|000029e0| 20 20 69 6e 74 20 6e 63 | 68 61 72 73 3b 09 09 09 | int nc|hars;...|
|000029f0| 2f 2a 20 4e 75 6d 62 65 | 72 20 6f 66 20 6c 69 74 |/* Numbe|r of lit|
|00002a00| 65 72 61 6c 20 63 68 61 | 72 73 20 74 6f 20 63 6f |eral cha|rs to co|
|00002a10| 70 79 20 62 65 66 6f 72 | 65 0d 09 09 09 09 20 20 |py befor|e..... |
|00002a20| 20 74 68 69 73 20 61 72 | 67 20 6f 63 63 75 72 72 | this ar|g occurr|
|00002a30| 65 6e 63 65 2e 20 20 2a | 2f 0d 20 20 20 20 69 6e |ence. *|/. in|
|00002a40| 74 20 61 72 67 6e 6f 3b | 09 09 09 2f 2a 20 4e 75 |t argno;|.../* Nu|
|00002a50| 6d 62 65 72 20 6f 66 20 | 61 72 67 20 74 6f 20 73 |mber of |arg to s|
|00002a60| 75 62 73 74 69 74 75 74 | 65 20 28 6f 72 69 67 69 |ubstitut|e (origi|
|00002a70| 6e 2d 30 29 20 2a 2f 0d | 20 20 7d 20 2a 70 61 74 |n-0) */.| } *pat|
|00002a80| 74 65 72 6e 3b 0d 20 20 | 2f 2a 20 4e 61 6d 65 73 |tern;. |/* Names|
|00002a90| 20 6f 66 20 6d 61 63 72 | 6f 20 61 72 67 73 2c 20 | of macr|o args, |
|00002aa0| 63 6f 6e 63 61 74 65 6e | 61 74 65 64 20 69 6e 20 |concaten|ated in |
|00002ab0| 72 65 76 65 72 73 65 20 | 6f 72 64 65 72 0d 20 20 |reverse |order. |
|00002ac0| 20 20 20 77 69 74 68 20 | 63 6f 6d 6d 61 2d 73 70 | with |comma-sp|
|00002ad0| 61 63 65 20 62 65 74 77 | 65 65 6e 20 74 68 65 6d |ace betw|een them|
|00002ae0| 2e 0d 20 20 20 20 20 54 | 68 65 20 6f 6e 6c 79 20 |.. T|he only |
|00002af0| 75 73 65 20 6f 66 20 74 | 68 69 73 20 69 73 20 74 |use of t|his is t|
|00002b00| 68 61 74 20 77 65 20 77 | 61 72 6e 20 6f 6e 20 72 |hat we w|arn on r|
|00002b10| 65 64 65 66 69 6e 69 74 | 69 6f 6e 0d 20 20 20 20 |edefinit|ion. |
|00002b20| 20 69 66 20 74 68 69 73 | 20 64 69 66 66 65 72 73 | if this| differs|
|00002b30| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 6f 6c 64 | between| the old|
|00002b40| 20 61 6e 64 20 6e 65 77 | 20 64 65 66 69 6e 69 74 | and new| definit|
|00002b50| 69 6f 6e 73 2e 20 20 2a | 2f 0d 20 20 55 5f 43 48 |ions. *|/. U_CH|
|00002b60| 41 52 20 2a 61 72 67 6e | 61 6d 65 73 3b 0d 7d 3b |AR *argn|ames;.};|
|00002b70| 0d 0d 2f 2a 20 64 69 66 | 66 65 72 65 6e 74 20 6b |../* dif|ferent k|
|00002b80| 69 6e 64 73 20 6f 66 20 | 74 68 69 6e 67 73 20 74 |inds of |things t|
|00002b90| 68 61 74 20 63 61 6e 20 | 61 70 70 65 61 72 20 69 |hat can |appear i|
|00002ba0| 6e 20 74 68 65 20 76 61 | 6c 75 65 20 66 69 65 6c |n the va|lue fiel|
|00002bb0| 64 0d 20 20 20 6f 66 20 | 61 20 68 61 73 68 20 6e |d. of |a hash n|
|00002bc0| 6f 64 65 2e 20 20 41 63 | 74 75 61 6c 6c 79 2c 20 |ode. Ac|tually, |
|00002bd0| 74 68 69 73 20 6d 61 79 | 20 62 65 20 75 73 65 6c |this may| be usel|
|00002be0| 65 73 73 20 6e 6f 77 2e | 20 2a 2f 0d 75 6e 69 6f |ess now.| */.unio|
|00002bf0| 6e 20 68 61 73 68 76 61 | 6c 20 7b 0d 20 20 69 6e |n hashva|l {. in|
|00002c00| 74 20 69 76 61 6c 3b 0d | 20 20 63 68 61 72 20 2a |t ival;.| char *|
|00002c10| 63 70 76 61 6c 3b 0d 20 | 20 44 45 46 49 4e 49 54 |cpval;. | DEFINIT|
|00002c20| 49 4f 4e 20 2a 64 65 66 | 6e 3b 0d 7d 3b 0d 0d 0d |ION *def|n;.};...|
|00002c30| 2f 2a 20 54 68 65 20 73 | 74 72 75 63 74 75 72 65 |/* The s|tructure|
|00002c40| 20 6f 66 20 61 20 6e 6f | 64 65 20 69 6e 20 74 68 | of a no|de in th|
|00002c50| 65 20 68 61 73 68 20 74 | 61 62 6c 65 2e 20 20 54 |e hash t|able. T|
|00002c60| 68 65 20 68 61 73 68 20 | 74 61 62 6c 65 0d 20 20 |he hash |table. |
|00002c70| 20 68 61 73 20 65 6e 74 | 72 69 65 73 20 66 6f 72 | has ent|ries for|
|00002c80| 20 61 6c 6c 20 74 6f 6b | 65 6e 73 20 64 65 66 69 | all tok|ens defi|
|00002c90| 6e 65 64 20 62 79 20 23 | 64 65 66 69 6e 65 20 63 |ned by #|define c|
|00002ca0| 6f 6d 6d 61 6e 64 73 20 | 28 74 79 70 65 20 54 5f |ommands |(type T_|
|00002cb0| 4d 41 43 52 4f 29 2c 0d | 20 20 20 70 6c 75 73 20 |MACRO),.| plus |
|00002cc0| 73 6f 6d 65 20 73 70 65 | 63 69 61 6c 20 74 6f 6b |some spe|cial tok|
|00002cd0| 65 6e 73 20 6c 69 6b 65 | 20 5f 5f 4c 49 4e 45 5f |ens like| __LINE_|
|00002ce0| 5f 20 28 74 68 65 73 65 | 20 65 61 63 68 20 68 61 |_ (these| each ha|
|00002cf0| 76 65 20 74 68 65 69 72 | 20 6f 77 6e 0d 20 20 20 |ve their| own. |
|00002d00| 74 79 70 65 2c 20 61 6e | 64 20 74 68 65 20 61 70 |type, an|d the ap|
|00002d10| 70 72 6f 70 72 69 61 74 | 65 20 63 6f 64 65 20 69 |propriat|e code i|
|00002d20| 73 20 72 75 6e 20 77 68 | 65 6e 20 74 68 61 74 20 |s run wh|en that |
|00002d30| 74 79 70 65 20 6f 66 20 | 6e 6f 64 65 20 69 73 20 |type of |node is |
|00002d40| 73 65 65 6e 2e 0d 20 20 | 20 49 74 20 64 6f 65 73 |seen.. | It does|
|00002d50| 20 6e 6f 74 20 63 6f 6e | 74 61 69 6e 20 63 6f 6e | not con|tain con|
|00002d60| 74 72 6f 6c 20 77 6f 72 | 64 73 20 6c 69 6b 65 20 |trol wor|ds like |
|00002d70| 22 23 64 65 66 69 6e 65 | 22 2c 20 77 68 69 63 68 |"#define|", which|
|00002d80| 20 61 72 65 20 72 65 63 | 6f 67 6e 69 7a 65 64 0d | are rec|ognized.|
|00002d90| 20 20 20 62 79 20 61 20 | 73 65 70 61 72 61 74 65 | by a |separate|
|00002da0| 20 70 69 65 63 65 20 6f | 66 20 63 6f 64 65 2e 20 | piece o|f code. |
|00002db0| 2a 2f 0d 0d 2f 2a 20 64 | 69 66 66 65 72 65 6e 74 |*/../* d|ifferent|
|00002dc0| 20 66 6c 61 76 6f 72 73 | 20 6f 66 20 68 61 73 68 | flavors| of hash|
|00002dd0| 20 6e 6f 64 65 73 20 2d | 2d 2d 20 61 6c 73 6f 20 | nodes -|-- also |
|00002de0| 75 73 65 64 20 69 6e 20 | 6b 65 79 77 6f 72 64 20 |used in |keyword |
|00002df0| 74 61 62 6c 65 20 2a 2f | 0d 65 6e 75 6d 20 6e 6f |table */|.enum no|
|00002e00| 64 65 5f 74 79 70 65 20 | 7b 0d 20 54 5f 44 45 46 |de_type |{. T_DEF|
|00002e10| 49 4e 45 20 3d 20 31 2c | 09 2f 2a 20 74 68 65 20 |INE = 1,|./* the |
|00002e20| 60 23 64 65 66 69 6e 65 | 27 20 6b 65 79 77 6f 72 |`#define|' keywor|
|00002e30| 64 20 2a 2f 0d 20 54 5f | 49 4e 43 4c 55 44 45 2c |d */. T_|INCLUDE,|
|00002e40| 09 2f 2a 20 74 68 65 20 | 60 23 69 6e 63 6c 75 64 |./* the |`#includ|
|00002e50| 65 27 20 6b 65 79 77 6f | 72 64 20 2a 2f 0d 20 54 |e' keywo|rd */. T|
|00002e60| 5f 49 46 44 45 46 2c 09 | 2f 2a 20 74 68 65 20 60 |_IFDEF,.|/* the `|
|00002e70| 23 69 66 64 65 66 27 20 | 6b 65 79 77 6f 72 64 20 |#ifdef' |keyword |
|00002e80| 2a 2f 0d 20 54 5f 49 46 | 4e 44 45 46 2c 09 2f 2a |*/. T_IF|NDEF,./*|
|00002e90| 20 74 68 65 20 60 23 69 | 66 6e 64 65 66 27 20 6b | the `#i|fndef' k|
|00002ea0| 65 79 77 6f 72 64 20 2a | 2f 0d 20 54 5f 49 46 2c |eyword *|/. T_IF,|
|00002eb0| 09 09 2f 2a 20 74 68 65 | 20 60 23 69 66 27 20 6b |../* the| `#if' k|
|00002ec0| 65 79 77 6f 72 64 20 2a | 2f 0d 20 54 5f 45 4c 53 |eyword *|/. T_ELS|
|00002ed0| 45 2c 09 2f 2a 20 60 23 | 65 6c 73 65 27 20 2a 2f |E,./* `#|else' */|
|00002ee0| 0d 20 54 5f 50 52 41 47 | 4d 41 2c 09 2f 2a 20 60 |. T_PRAG|MA,./* `|
|00002ef0| 23 70 72 61 67 6d 61 27 | 20 2a 2f 0d 20 54 5f 45 |#pragma'| */. T_E|
|00002f00| 4c 49 46 2c 09 2f 2a 20 | 60 23 65 6c 73 65 27 20 |LIF,./* |`#else' |
|00002f10| 2a 2f 0d 20 54 5f 55 4e | 44 45 46 2c 09 2f 2a 20 |*/. T_UN|DEF,./* |
|00002f20| 60 23 75 6e 64 65 66 27 | 20 2a 2f 0d 20 54 5f 4c |`#undef'| */. T_L|
|00002f30| 49 4e 45 2c 09 2f 2a 20 | 60 23 6c 69 6e 65 27 20 |INE,./* |`#line' |
|00002f40| 2a 2f 0d 20 54 5f 45 52 | 52 4f 52 2c 09 2f 2a 20 |*/. T_ER|ROR,./* |
|00002f50| 60 23 65 72 72 6f 72 27 | 20 2a 2f 0d 20 54 5f 45 |`#error'| */. T_E|
|00002f60| 4e 44 49 46 2c 09 2f 2a | 20 60 23 65 6e 64 69 66 |NDIF,./*| `#endif|
|00002f70| 27 20 2a 2f 0d 20 54 5f | 53 43 43 53 2c 09 2f 2a |' */. T_|SCCS,./*|
|00002f80| 20 60 23 73 63 63 73 27 | 2c 20 75 73 65 64 20 6f | `#sccs'|, used o|
|00002f90| 6e 20 73 79 73 74 65 6d | 20 56 2e 20 20 2a 2f 0d |n system| V. */.|
|00002fa0| 20 54 5f 49 44 45 4e 54 | 2c 09 2f 2a 20 60 23 69 | T_IDENT|,./* `#i|
|00002fb0| 64 65 6e 74 27 2c 20 75 | 73 65 64 20 6f 6e 20 73 |dent', u|sed on s|
|00002fc0| 79 73 74 65 6d 20 56 2e | 20 20 2a 2f 0d 20 54 5f |ystem V.| */. T_|
|00002fd0| 53 50 45 43 4c 49 4e 45 | 2c 09 2f 2a 20 73 70 65 |SPECLINE|,./* spe|
|00002fe0| 63 69 61 6c 20 73 79 6d | 62 6f 6c 20 60 5f 5f 4c |cial sym|bol `__L|
|00002ff0| 49 4e 45 5f 5f 27 20 2a | 2f 0d 20 54 5f 44 41 54 |INE__' *|/. T_DAT|
|00003000| 45 2c 09 2f 2a 20 60 5f | 5f 44 41 54 45 5f 5f 27 |E,./* `_|_DATE__'|
|00003010| 20 2a 2f 0d 20 54 5f 46 | 49 4c 45 2c 09 2f 2a 20 | */. T_F|ILE,./* |
|00003020| 60 5f 5f 46 49 4c 45 5f | 5f 27 20 2a 2f 0d 20 54 |`__FILE_|_' */. T|
|00003030| 5f 42 41 53 45 5f 46 49 | 4c 45 2c 09 2f 2a 20 60 |_BASE_FI|LE,./* `|
|00003040| 5f 5f 42 41 53 45 5f 46 | 49 4c 45 5f 5f 27 20 2a |__BASE_F|ILE__' *|
|00003050| 2f 0d 20 54 5f 49 4e 43 | 4c 55 44 45 5f 4c 45 56 |/. T_INC|LUDE_LEV|
|00003060| 45 4c 2c 20 2f 2a 20 60 | 5f 5f 49 4e 43 4c 55 44 |EL, /* `|__INCLUD|
|00003070| 45 5f 4c 45 56 45 4c 5f | 5f 27 20 2a 2f 0d 20 54 |E_LEVEL_|_' */. T|
|00003080| 5f 56 45 52 53 49 4f 4e | 2c 09 2f 2a 20 60 5f 5f |_VERSION|,./* `__|
|00003090| 56 45 52 53 49 4f 4e 5f | 5f 27 20 2a 2f 0d 20 54 |VERSION_|_' */. T|
|000030a0| 5f 54 49 4d 45 2c 09 2f | 2a 20 60 5f 5f 54 49 4d |_TIME,./|* `__TIM|
|000030b0| 45 5f 5f 27 20 2a 2f 0d | 20 54 5f 43 4f 4e 53 54 |E__' */.| T_CONST|
|000030c0| 2c 09 2f 2a 20 43 6f 6e | 73 74 61 6e 74 20 76 61 |,./* Con|stant va|
|000030d0| 6c 75 65 2c 20 75 73 65 | 64 20 62 79 20 60 5f 5f |lue, use|d by `__|
|000030e0| 53 54 44 43 5f 5f 27 20 | 2a 2f 0d 20 54 5f 4d 41 |STDC__' |*/. T_MA|
|000030f0| 43 52 4f 2c 09 2f 2a 20 | 6d 61 63 72 6f 20 64 65 |CRO,./* |macro de|
|00003100| 66 69 6e 65 64 20 62 79 | 20 60 23 64 65 66 69 6e |fined by| `#defin|
|00003110| 65 27 20 2a 2f 0d 20 54 | 5f 44 49 53 41 42 4c 45 |e' */. T|_DISABLE|
|00003120| 44 2c 09 2f 2a 20 6d 61 | 63 72 6f 20 74 65 6d 70 |D,./* ma|cro temp|
|00003130| 6f 72 61 72 69 6c 79 20 | 74 75 72 6e 65 64 20 6f |orarily |turned o|
|00003140| 66 66 20 66 6f 72 20 72 | 65 73 63 61 6e 20 2a 2f |ff for r|escan */|
|00003150| 0d 20 54 5f 53 50 45 43 | 5f 44 45 46 49 4e 45 44 |. T_SPEC|_DEFINED|
|00003160| 2c 20 2f 2a 20 73 70 65 | 63 69 61 6c 20 60 64 65 |, /* spe|cial `de|
|00003170| 66 69 6e 65 64 27 20 6d | 61 63 72 6f 20 66 6f 72 |fined' m|acro for|
|00003180| 20 75 73 65 20 69 6e 20 | 23 69 66 20 73 74 61 74 | use in |#if stat|
|00003190| 65 6d 65 6e 74 73 20 2a | 2f 0d 20 54 5f 55 4e 55 |ements *|/. T_UNU|
|000031a0| 53 45 44 09 2f 2a 20 55 | 73 65 64 20 66 6f 72 20 |SED./* U|sed for |
|000031b0| 73 6f 6d 65 74 68 69 6e | 67 20 6e 6f 74 20 64 65 |somethin|g not de|
|000031c0| 66 69 6e 65 64 2e 20 20 | 2a 2f 0d 20 7d 3b 0d 0d |fined. |*/. };..|
|000031d0| 73 74 72 75 63 74 20 68 | 61 73 68 6e 6f 64 65 20 |struct h|ashnode |
|000031e0| 7b 0d 20 20 73 74 72 75 | 63 74 20 68 61 73 68 6e |{. stru|ct hashn|
|000031f0| 6f 64 65 20 2a 6e 65 78 | 74 3b 09 2f 2a 20 64 6f |ode *nex|t;./* do|
|00003200| 75 62 6c 65 20 6c 69 6e | 6b 73 20 66 6f 72 20 65 |uble lin|ks for e|
|00003210| 61 73 79 20 64 65 6c 65 | 74 69 6f 6e 20 2a 2f 0d |asy dele|tion */.|
|00003220| 20 20 73 74 72 75 63 74 | 20 68 61 73 68 6e 6f 64 | struct| hashnod|
|00003230| 65 20 2a 70 72 65 76 3b | 0d 20 20 73 74 72 75 63 |e *prev;|. struc|
|00003240| 74 20 68 61 73 68 6e 6f | 64 65 20 2a 2a 62 75 63 |t hashno|de **buc|
|00003250| 6b 65 74 5f 68 64 72 3b | 09 2f 2a 20 61 6c 73 6f |ket_hdr;|./* also|
|00003260| 2c 20 61 20 62 61 63 6b | 20 70 6f 69 6e 74 65 72 |, a back| pointer|
|00003270| 20 74 6f 20 74 68 69 73 | 20 6e 6f 64 65 27 73 20 | to this| node's |
|00003280| 68 61 73 68 0d 09 09 09 | 09 20 20 20 63 68 61 69 |hash....|. chai|
|00003290| 6e 20 69 73 20 6b 65 70 | 74 2c 20 69 6e 20 63 61 |n is kep|t, in ca|
|000032a0| 73 65 20 74 68 65 20 6e | 6f 64 65 20 69 73 20 74 |se the n|ode is t|
|000032b0| 68 65 20 68 65 61 64 0d | 09 09 09 09 20 20 20 6f |he head.|.... o|
|000032c0| 66 20 74 68 65 20 63 68 | 61 69 6e 20 61 6e 64 20 |f the ch|ain and |
|000032d0| 67 65 74 73 20 64 65 6c | 65 74 65 64 2e 20 2a 2f |gets del|eted. */|
|000032e0| 0d 20 20 65 6e 75 6d 20 | 6e 6f 64 65 5f 74 79 70 |. enum |node_typ|
|000032f0| 65 20 74 79 70 65 3b 09 | 09 2f 2a 20 74 79 70 65 |e type;.|./* type|
|00003300| 20 6f 66 20 73 70 65 63 | 69 61 6c 20 74 6f 6b 65 | of spec|ial toke|
|00003310| 6e 20 2a 2f 0d 20 20 69 | 6e 74 20 6c 65 6e 67 74 |n */. i|nt lengt|
|00003320| 68 3b 09 09 09 2f 2a 20 | 6c 65 6e 67 74 68 20 6f |h;.../* |length o|
|00003330| 66 20 74 6f 6b 65 6e 2c | 20 66 6f 72 20 71 75 69 |f token,| for qui|
|00003340| 63 6b 20 63 6f 6d 70 61 | 72 69 73 6f 6e 20 2a 2f |ck compa|rison */|
|00003350| 0d 20 20 55 5f 43 48 41 | 52 20 2a 6e 61 6d 65 3b |. U_CHA|R *name;|
|00003360| 09 09 09 2f 2a 20 74 68 | 65 20 61 63 74 75 61 6c |.../* th|e actual|
|00003370| 20 6e 61 6d 65 20 2a 2f | 0d 20 20 75 6e 69 6f 6e | name */|. union|
|00003380| 20 68 61 73 68 76 61 6c | 20 76 61 6c 75 65 3b 09 | hashval| value;.|
|00003390| 09 2f 2a 20 70 6f 69 6e | 74 65 72 20 74 6f 20 65 |./* poin|ter to e|
|000033a0| 78 70 61 6e 73 69 6f 6e | 2c 20 6f 72 20 77 68 61 |xpansion|, or wha|
|000033b0| 74 65 76 65 72 20 2a 2f | 0d 7d 3b 0d 0d 74 79 70 |tever */|.};..typ|
|000033c0| 65 64 65 66 20 73 74 72 | 75 63 74 20 68 61 73 68 |edef str|uct hash|
|000033d0| 6e 6f 64 65 20 48 41 53 | 48 4e 4f 44 45 3b 0d 0d |node HAS|HNODE;..|
|000033e0| 2f 2a 20 53 6f 6d 65 20 | 64 65 66 69 6e 69 74 69 |/* Some |definiti|
|000033f0| 6f 6e 73 20 66 6f 72 20 | 74 68 65 20 68 61 73 68 |ons for |the hash|
|00003400| 20 74 61 62 6c 65 2e 20 | 20 54 68 65 20 68 61 73 | table. | The has|
|00003410| 68 20 66 75 6e 63 74 69 | 6f 6e 20 4d 55 53 54 20 |h functi|on MUST |
|00003420| 62 65 0d 20 20 20 63 6f | 6d 70 75 74 65 64 20 61 |be. co|mputed a|
|00003430| 73 20 73 68 6f 77 6e 20 | 69 6e 20 68 61 73 68 66 |s shown |in hashf|
|00003440| 20 28 29 20 62 65 6c 6f | 77 2e 20 20 54 68 61 74 | () belo|w. That|
|00003450| 20 69 73 20 62 65 63 61 | 75 73 65 20 74 68 65 20 | is beca|use the |
|00003460| 72 65 73 63 61 6e 0d 20 | 20 20 6c 6f 6f 70 20 63 |rescan. | loop c|
|00003470| 6f 6d 70 75 74 65 73 20 | 74 68 65 20 68 61 73 68 |omputes |the hash|
|00003480| 20 76 61 6c 75 65 20 60 | 6f 6e 20 74 68 65 20 66 | value `|on the f|
|00003490| 6c 79 27 20 66 6f 72 20 | 6d 6f 73 74 20 74 6f 6b |ly' for |most tok|
|000034a0| 65 6e 73 2c 0d 20 20 20 | 69 6e 20 6f 72 64 65 72 |ens,. |in order|
|000034b0| 20 74 6f 20 61 76 6f 69 | 64 20 74 68 65 20 6f 76 | to avoi|d the ov|
|000034c0| 65 72 68 65 61 64 20 6f | 66 20 61 20 6c 6f 74 20 |erhead o|f a lot |
|000034d0| 6f 66 20 70 72 6f 63 65 | 64 75 72 65 20 63 61 6c |of proce|dure cal|
|000034e0| 6c 73 20 74 6f 0d 20 20 | 20 74 68 65 20 68 61 73 |ls to. | the has|
|000034f0| 68 66 20 28 29 20 66 75 | 6e 63 74 69 6f 6e 2e 20 |hf () fu|nction. |
|00003500| 20 48 61 73 68 66 20 28 | 29 20 6f 6e 6c 79 20 65 | Hashf (|) only e|
|00003510| 78 69 73 74 73 20 66 6f | 72 20 74 68 65 20 73 61 |xists fo|r the sa|
|00003520| 6b 65 20 6f 66 0d 20 20 | 20 70 6f 6c 69 74 65 6e |ke of. | politen|
|00003530| 65 73 73 2c 20 66 6f 72 | 20 75 73 65 20 77 68 65 |ess, for| use whe|
|00003540| 6e 20 73 70 65 65 64 20 | 69 73 6e 27 74 20 73 6f |n speed |isn't so|
|00003550| 20 69 6d 70 6f 72 74 61 | 6e 74 2e 20 2a 2f 0d 0d | importa|nt. */..|
|00003560| 23 64 65 66 69 6e 65 20 | 48 41 53 48 53 49 5a 45 |#define |HASHSIZE|
|00003570| 20 31 34 30 33 0d 48 41 | 53 48 4e 4f 44 45 20 2a | 1403.HA|SHNODE *|
|00003580| 68 61 73 68 74 61 62 5b | 48 41 53 48 53 49 5a 45 |hashtab[|HASHSIZE|
|00003590| 5d 3b 0d 23 64 65 66 69 | 6e 65 20 48 41 53 48 53 |];.#defi|ne HASHS|
|000035a0| 54 45 50 28 6f 6c 64 2c | 20 63 29 20 28 28 6f 6c |TEP(old,| c) ((ol|
|000035b0| 64 20 3c 3c 20 32 29 20 | 2b 20 63 29 0d 23 64 65 |d << 2) |+ c).#de|
|000035c0| 66 69 6e 65 20 4d 41 4b | 45 5f 50 4f 53 28 76 29 |fine MAK|E_POS(v)|
|000035d0| 20 28 76 20 26 20 7e 30 | 78 38 30 30 30 30 30 30 | (v & ~0|x8000000|
|000035e0| 30 29 20 2f 2a 20 6d 61 | 6b 65 20 6e 75 6d 62 65 |0) /* ma|ke numbe|
|000035f0| 72 20 70 6f 73 69 74 69 | 76 65 20 2a 2f 0d 0d 2f |r positi|ve */../|
|00003600| 2a 20 53 79 6d 62 6f 6c | 73 20 74 6f 20 70 72 65 |* Symbol|s to pre|
|00003610| 64 65 66 69 6e 65 2e 20 | 20 2a 2f 0d 0d 23 69 66 |define. | */..#if|
|00003620| 64 65 66 20 43 50 50 5f | 50 52 45 44 45 46 49 4e |def CPP_|PREDEFIN|
|00003630| 45 53 0d 63 68 61 72 20 | 2a 70 72 65 64 65 66 73 |ES.char |*predefs|
|00003640| 20 3d 20 43 50 50 5f 50 | 52 45 44 45 46 49 4e 45 | = CPP_P|REDEFINE|
|00003650| 53 3b 0d 23 65 6c 73 65 | 0d 63 68 61 72 20 2a 70 |S;.#else|.char *p|
|00003660| 72 65 64 65 66 73 20 3d | 20 22 22 3b 0d 23 65 6e |redefs =| "";.#en|
|00003670| 64 69 66 0d 0d 2f 2a 20 | 60 73 74 72 75 63 74 20 |dif../* |`struct |
|00003680| 64 69 72 65 63 74 69 76 | 65 27 20 64 65 66 69 6e |directiv|e' defin|
|00003690| 65 73 20 6f 6e 65 20 23 | 2d 64 69 72 65 63 74 69 |es one #|-directi|
|000036a0| 76 65 2c 20 69 6e 63 6c | 75 64 69 6e 67 20 68 6f |ve, incl|uding ho|
|000036b0| 77 20 74 6f 20 68 61 6e | 64 6c 65 20 69 74 2e 20 |w to han|dle it. |
|000036c0| 20 2a 2f 0d 0d 73 74 72 | 75 63 74 20 64 69 72 65 | */..str|uct dire|
|000036d0| 63 74 69 76 65 20 7b 0d | 20 20 69 6e 74 20 6c 65 |ctive {.| int le|
|000036e0| 6e 67 74 68 3b 09 09 09 | 2f 2a 20 4c 65 6e 67 74 |ngth;...|/* Lengt|
|000036f0| 68 20 6f 66 20 6e 61 6d | 65 20 2a 2f 0d 20 20 69 |h of nam|e */. i|
|00003700| 6e 74 20 28 2a 66 75 6e | 63 29 28 29 3b 09 09 2f |nt (*fun|c)();../|
|00003710| 2a 20 46 75 6e 63 74 69 | 6f 6e 20 74 6f 20 68 61 |* Functi|on to ha|
|00003720| 6e 64 6c 65 20 64 69 72 | 65 63 74 69 76 65 20 2a |ndle dir|ective *|
|00003730| 2f 0d 20 20 63 68 61 72 | 20 2a 6e 61 6d 65 3b 09 |/. char| *name;.|
|00003740| 09 09 2f 2a 20 4e 61 6d | 65 20 6f 66 20 64 69 72 |../* Nam|e of dir|
|00003750| 65 63 74 69 76 65 20 2a | 2f 0d 20 20 65 6e 75 6d |ective *|/. enum|
|00003760| 20 6e 6f 64 65 5f 74 79 | 70 65 20 74 79 70 65 3b | node_ty|pe type;|
|00003770| 09 09 2f 2a 20 43 6f 64 | 65 20 77 68 69 63 68 20 |../* Cod|e which |
|00003780| 64 65 73 63 72 69 62 65 | 73 20 77 68 69 63 68 20 |describe|s which |
|00003790| 64 69 72 65 63 74 69 76 | 65 2e 20 2a 2f 0d 20 20 |directiv|e. */. |
|000037a0| 63 68 61 72 20 61 6e 67 | 6c 65 5f 62 72 61 63 6b |char ang|le_brack|
|000037b0| 65 74 73 3b 09 09 2f 2a | 20 4e 6f 6e 7a 65 72 6f |ets;../*| Nonzero|
|000037c0| 20 3d 3e 20 3c 2e 2e 2e | 3e 20 69 73 20 73 70 65 | => <...|> is spe|
|000037d0| 63 69 61 6c 2e 20 20 2a | 2f 0d 20 20 63 68 61 72 |cial. *|/. char|
|000037e0| 20 74 72 61 64 69 74 69 | 6f 6e 61 6c 5f 63 6f 6d | traditi|onal_com|
|000037f0| 6d 65 6e 74 73 3b 09 2f | 2a 20 4e 6f 6e 7a 65 72 |ments;./|* Nonzer|
|00003800| 6f 3a 20 6b 65 65 70 20 | 63 6f 6d 6d 65 6e 74 73 |o: keep |comments|
|00003810| 20 69 66 20 2d 74 72 61 | 64 69 74 69 6f 6e 61 6c | if -tra|ditional|
|00003820| 2e 20 20 2a 2f 0d 20 20 | 63 68 61 72 20 70 61 73 |. */. |char pas|
|00003830| 73 5f 74 68 72 75 3b 09 | 09 2f 2a 20 43 6f 70 79 |s_thru;.|./* Copy|
|00003840| 20 70 72 65 70 72 6f 63 | 65 73 73 65 64 20 64 69 | preproc|essed di|
|00003850| 72 65 63 74 69 76 65 20 | 74 6f 20 6f 75 74 70 75 |rective |to outpu|
|00003860| 74 20 66 69 6c 65 2e 20 | 20 2a 2f 0d 7d 3b 0d 0d |t file. | */.};..|
|00003870| 2f 2a 20 48 65 72 65 20 | 69 73 20 74 68 65 20 61 |/* Here |is the a|
|00003880| 63 74 75 61 6c 20 6c 69 | 73 74 20 6f 66 20 23 2d |ctual li|st of #-|
|00003890| 64 69 72 65 63 74 69 76 | 65 73 2c 20 6d 6f 73 74 |directiv|es, most|
|000038a0| 2d 6f 66 74 65 6e 2d 75 | 73 65 64 20 66 69 72 73 |-often-u|sed firs|
|000038b0| 74 2e 20 20 2a 2f 0d 0d | 73 74 72 75 63 74 20 64 |t. */..|struct d|
|000038c0| 69 72 65 63 74 69 76 65 | 20 64 69 72 65 63 74 69 |irective| directi|
|000038d0| 76 65 5f 74 61 62 6c 65 | 5b 5d 20 3d 20 7b 0d 20 |ve_table|[] = {. |
|000038e0| 20 7b 20 20 36 2c 20 64 | 6f 5f 64 65 66 69 6e 65 | { 6, d|o_define|
|000038f0| 2c 20 22 64 65 66 69 6e | 65 22 2c 20 54 5f 44 45 |, "defin|e", T_DE|
|00003900| 46 49 4e 45 2c 20 30 2c | 20 31 7d 2c 0d 20 20 7b |FINE, 0,| 1},. {|
|00003910| 20 20 32 2c 20 64 6f 5f | 69 66 2c 20 22 69 66 22 | 2, do_|if, "if"|
|00003920| 2c 20 54 5f 49 46 7d 2c | 0d 20 20 7b 20 20 35 2c |, T_IF},|. { 5,|
|00003930| 20 64 6f 5f 78 69 66 64 | 65 66 2c 20 22 69 66 64 | do_xifd|ef, "ifd|
|00003940| 65 66 22 2c 20 54 5f 49 | 46 44 45 46 7d 2c 0d 20 |ef", T_I|FDEF},. |
|00003950| 20 7b 20 20 36 2c 20 64 | 6f 5f 78 69 66 64 65 66 | { 6, d|o_xifdef|
|00003960| 2c 20 22 69 66 6e 64 65 | 66 22 2c 20 54 5f 49 46 |, "ifnde|f", T_IF|
|00003970| 4e 44 45 46 7d 2c 0d 20 | 20 7b 20 20 35 2c 20 64 |NDEF},. | { 5, d|
|00003980| 6f 5f 65 6e 64 69 66 2c | 20 22 65 6e 64 69 66 22 |o_endif,| "endif"|
|00003990| 2c 20 54 5f 45 4e 44 49 | 46 7d 2c 0d 20 20 7b 20 |, T_ENDI|F},. { |
|000039a0| 20 34 2c 20 64 6f 5f 65 | 6c 73 65 2c 20 22 65 6c | 4, do_e|lse, "el|
|000039b0| 73 65 22 2c 20 54 5f 45 | 4c 53 45 7d 2c 0d 20 20 |se", T_E|LSE},. |
|000039c0| 7b 20 20 34 2c 20 64 6f | 5f 65 6c 69 66 2c 20 22 |{ 4, do|_elif, "|
|000039d0| 65 6c 69 66 22 2c 20 54 | 5f 45 4c 49 46 7d 2c 0d |elif", T|_ELIF},.|
|000039e0| 20 20 7b 20 20 34 2c 20 | 64 6f 5f 6c 69 6e 65 2c | { 4, |do_line,|
|000039f0| 20 22 6c 69 6e 65 22 2c | 20 54 5f 4c 49 4e 45 7d | "line",| T_LINE}|
|00003a00| 2c 0d 20 20 7b 20 20 37 | 2c 20 64 6f 5f 69 6e 63 |,. { 7|, do_inc|
|00003a10| 6c 75 64 65 2c 20 22 69 | 6e 63 6c 75 64 65 22 2c |lude, "i|nclude",|
|00003a20| 20 54 5f 49 4e 43 4c 55 | 44 45 2c 20 31 7d 2c 0d | T_INCLU|DE, 1},.|
|00003a30| 20 20 7b 20 20 35 2c 20 | 64 6f 5f 75 6e 64 65 66 | { 5, |do_undef|
|00003a40| 2c 20 22 75 6e 64 65 66 | 22 2c 20 54 5f 55 4e 44 |, "undef|", T_UND|
|00003a50| 45 46 7d 2c 0d 20 20 7b | 20 20 35 2c 20 64 6f 5f |EF},. {| 5, do_|
|00003a60| 65 72 72 6f 72 2c 20 22 | 65 72 72 6f 72 22 2c 20 |error, "|error", |
|00003a70| 54 5f 45 52 52 4f 52 7d | 2c 0d 23 69 66 64 65 66 |T_ERROR}|,.#ifdef|
|00003a80| 20 53 43 43 53 5f 44 49 | 52 45 43 54 49 56 45 0d | SCCS_DI|RECTIVE.|
|00003a90| 20 20 7b 20 20 34 2c 20 | 64 6f 5f 73 63 63 73 2c | { 4, |do_sccs,|
|00003aa0| 20 22 73 63 63 73 22 2c | 20 54 5f 53 43 43 53 7d | "sccs",| T_SCCS}|
|00003ab0| 2c 0d 23 65 6e 64 69 66 | 0d 20 20 7b 20 20 36 2c |,.#endif|. { 6,|
|00003ac0| 20 64 6f 5f 70 72 61 67 | 6d 61 2c 20 22 70 72 61 | do_prag|ma, "pra|
|00003ad0| 67 6d 61 22 2c 20 54 5f | 50 52 41 47 4d 41 2c 20 |gma", T_|PRAGMA, |
|00003ae0| 30 2c 20 30 2c 20 31 7d | 2c 0d 20 20 7b 20 20 2d |0, 0, 1}|,. { -|
|00003af0| 31 2c 20 30 2c 20 22 22 | 2c 20 54 5f 55 4e 55 53 |1, 0, ""|, T_UNUS|
|00003b00| 45 44 7d 2c 0d 7d 3b 0d | 0d 2f 2a 20 74 61 62 6c |ED},.};.|./* tabl|
|00003b10| 65 20 74 6f 20 74 65 6c | 6c 20 69 66 20 63 68 61 |e to tel|l if cha|
|00003b20| 72 20 63 61 6e 20 62 65 | 20 70 61 72 74 20 6f 66 |r can be| part of|
|00003b30| 20 61 20 43 20 69 64 65 | 6e 74 69 66 69 65 72 2e | a C ide|ntifier.|
|00003b40| 20 2a 2f 0d 55 5f 43 48 | 41 52 20 69 73 5f 69 64 | */.U_CH|AR is_id|
|00003b50| 63 68 61 72 5b 32 35 36 | 5d 3b 0d 2f 2a 20 74 61 |char[256|];./* ta|
|00003b60| 62 6c 65 20 74 6f 20 74 | 65 6c 6c 20 69 66 20 63 |ble to t|ell if c|
|00003b70| 68 61 72 20 63 61 6e 20 | 62 65 20 66 69 72 73 74 |har can |be first|
|00003b80| 20 63 68 61 72 20 6f 66 | 20 61 20 63 20 69 64 65 | char of| a c ide|
|00003b90| 6e 74 69 66 69 65 72 2e | 20 2a 2f 0d 55 5f 43 48 |ntifier.| */.U_CH|
|00003ba0| 41 52 20 69 73 5f 69 64 | 73 74 61 72 74 5b 32 35 |AR is_id|start[25|
|00003bb0| 36 5d 3b 0d 2f 2a 20 74 | 61 62 6c 65 20 74 6f 20 |6];./* t|able to |
|00003bc0| 74 65 6c 6c 20 69 66 20 | 63 20 69 73 20 68 6f 72 |tell if |c is hor|
|00003bd0| 69 7a 6f 6e 74 61 6c 20 | 73 70 61 63 65 2e 20 20 |izontal |space. |
|00003be0| 2a 2f 0d 55 5f 43 48 41 | 52 20 69 73 5f 68 6f 72 |*/.U_CHA|R is_hor|
|00003bf0| 5f 73 70 61 63 65 5b 32 | 35 36 5d 3b 0d 2f 2a 20 |_space[2|56];./* |
|00003c00| 74 61 62 6c 65 20 74 6f | 20 74 65 6c 6c 20 69 66 |table to| tell if|
|00003c10| 20 63 20 69 73 20 68 6f | 72 69 7a 6f 6e 74 61 6c | c is ho|rizontal|
|00003c20| 20 6f 72 20 76 65 72 74 | 69 63 61 6c 20 73 70 61 | or vert|ical spa|
|00003c30| 63 65 2e 20 20 2a 2f 0d | 55 5f 43 48 41 52 20 69 |ce. */.|U_CHAR i|
|00003c40| 73 5f 73 70 61 63 65 5b | 32 35 36 5d 3b 0d 0d 23 |s_space[|256];..#|
|00003c50| 64 65 66 69 6e 65 20 53 | 4b 49 50 5f 57 48 49 54 |define S|KIP_WHIT|
|00003c60| 45 5f 53 50 41 43 45 28 | 70 29 20 64 6f 20 7b 20 |E_SPACE(|p) do { |
|00003c70| 77 68 69 6c 65 20 28 69 | 73 5f 68 6f 72 5f 73 70 |while (i|s_hor_sp|
|00003c80| 61 63 65 5b 2a 70 5d 29 | 20 70 2b 2b 3b 20 7d 20 |ace[*p])| p++; } |
|00003c90| 77 68 69 6c 65 20 28 30 | 29 0d 23 64 65 66 69 6e |while (0|).#defin|
|00003ca0| 65 20 53 4b 49 50 5f 41 | 4c 4c 5f 57 48 49 54 45 |e SKIP_A|LL_WHITE|
|00003cb0| 5f 53 50 41 43 45 28 70 | 29 20 64 6f 20 7b 20 77 |_SPACE(p|) do { w|
|00003cc0| 68 69 6c 65 20 28 69 73 | 5f 73 70 61 63 65 5b 2a |hile (is|_space[*|
|00003cd0| 70 5d 29 20 70 2b 2b 3b | 20 7d 20 77 68 69 6c 65 |p]) p++;| } while|
|00003ce0| 20 28 30 29 0d 20 20 0d | 69 6e 74 20 65 72 72 6f | (0). .|int erro|
|00003cf0| 72 73 20 3d 20 30 3b 09 | 09 09 2f 2a 20 45 72 72 |rs = 0;.|../* Err|
|00003d00| 6f 72 20 63 6f 75 6e 74 | 65 72 20 66 6f 72 20 65 |or count|er for e|
|00003d10| 78 69 74 20 63 6f 64 65 | 20 2a 2f 0d 0d 2f 2a 20 |xit code| */../* |
|00003d20| 5a 65 72 6f 20 6d 65 61 | 6e 73 20 64 6f 6c 6c 61 |Zero mea|ns dolla|
|00003d30| 72 20 73 69 67 6e 73 20 | 61 72 65 20 70 75 6e 63 |r signs |are punc|
|00003d40| 74 75 61 74 69 6f 6e 2e | 0d 20 20 20 2d 24 20 73 |tuation.|. -$ s|
|00003d50| 74 6f 72 65 73 20 30 3b | 20 2d 74 72 61 64 69 74 |tores 0;| -tradit|
|00003d60| 69 6f 6e 61 6c 2c 20 73 | 74 6f 72 65 73 20 31 2e |ional, s|tores 1.|
|00003d70| 20 20 44 65 66 61 75 6c | 74 20 69 73 20 31 20 66 | Defaul|t is 1 f|
|00003d80| 6f 72 20 56 4d 53 2c 20 | 30 20 6f 74 68 65 72 77 |or VMS, |0 otherw|
|00003d90| 69 73 65 2e 0d 20 20 20 | 54 68 69 73 20 6d 75 73 |ise.. |This mus|
|00003da0| 74 20 62 65 20 30 20 66 | 6f 72 20 63 6f 72 72 65 |t be 0 f|or corre|
|00003db0| 63 74 20 70 72 6f 63 65 | 73 73 69 6e 67 20 6f 66 |ct proce|ssing of|
|00003dc0| 20 74 68 69 73 20 41 4e | 53 49 20 43 20 70 72 6f | this AN|SI C pro|
|00003dd0| 67 72 61 6d 3a 0d 09 23 | 64 65 66 69 6e 65 20 66 |gram:..#|define f|
|00003de0| 6f 6f 28 61 29 20 23 61 | 0d 09 23 64 65 66 69 6e |oo(a) #a|..#defin|
|00003df0| 65 20 6c 6f 73 65 28 62 | 29 20 66 6f 6f 28 62 29 |e lose(b|) foo(b)|
|00003e00| 0d 09 23 64 65 66 69 6e | 65 20 74 65 73 74 24 0d |..#defin|e test$.|
|00003e10| 09 6c 6f 73 65 28 74 65 | 73 74 29 09 2a 2f 0d 23 |.lose(te|st).*/.#|
|00003e20| 69 66 6e 64 65 66 20 44 | 4f 4c 4c 41 52 53 5f 49 |ifndef D|OLLARS_I|
|00003e30| 4e 5f 49 44 45 4e 54 49 | 46 49 45 52 53 0d 23 64 |N_IDENTI|FIERS.#d|
|00003e40| 65 66 69 6e 65 20 44 4f | 4c 4c 41 52 53 5f 49 4e |efine DO|LLARS_IN|
|00003e50| 5f 49 44 45 4e 54 49 46 | 49 45 52 53 20 30 0d 23 |_IDENTIF|IERS 0.#|
|00003e60| 65 6e 64 69 66 0d 69 6e | 74 20 64 6f 6c 6c 61 72 |endif.in|t dollar|
|00003e70| 73 5f 69 6e 5f 69 64 65 | 6e 74 20 3d 20 44 4f 4c |s_in_ide|nt = DOL|
|00003e80| 4c 41 52 53 5f 49 4e 5f | 49 44 45 4e 54 49 46 49 |LARS_IN_|IDENTIFI|
|00003e90| 45 52 53 3b 0d 0d 46 49 | 4c 45 5f 42 55 46 20 65 |ERS;..FI|LE_BUF e|
|00003ea0| 78 70 61 6e 64 5f 74 6f | 5f 74 65 6d 70 5f 62 75 |xpand_to|_temp_bu|
|00003eb0| 66 66 65 72 20 28 29 3b | 0d 0d 44 45 46 49 4e 49 |ffer ();|..DEFINI|
|00003ec0| 54 49 4f 4e 20 2a 63 6f | 6c 6c 65 63 74 5f 65 78 |TION *co|llect_ex|
|00003ed0| 70 61 6e 73 69 6f 6e 20 | 28 29 3b 0d 0d 2f 2a 20 |pansion |();../* |
|00003ee0| 53 74 61 63 6b 20 6f 66 | 20 63 6f 6e 64 69 74 69 |Stack of| conditi|
|00003ef0| 6f 6e 61 6c 73 20 63 75 | 72 72 65 6e 74 6c 79 20 |onals cu|rrently |
|00003f00| 69 6e 20 70 72 6f 67 72 | 65 73 73 0d 20 20 20 28 |in progr|ess. (|
|00003f10| 69 6e 63 6c 75 64 69 6e | 67 20 62 6f 74 68 20 73 |includin|g both s|
|00003f20| 75 63 63 65 73 73 66 75 | 6c 20 61 6e 64 20 66 61 |uccessfu|l and fa|
|00003f30| 69 6c 69 6e 67 20 63 6f | 6e 64 69 74 69 6f 6e 61 |iling co|nditiona|
|00003f40| 6c 73 29 2e 20 20 2a 2f | 0d 0d 73 74 72 75 63 74 |ls). */|..struct|
|00003f50| 20 69 66 5f 73 74 61 63 | 6b 20 7b 0d 20 20 73 74 | if_stac|k {. st|
|00003f60| 72 75 63 74 20 69 66 5f | 73 74 61 63 6b 20 2a 6e |ruct if_|stack *n|
|00003f70| 65 78 74 3b 09 2f 2a 20 | 66 6f 72 20 63 68 61 69 |ext;./* |for chai|
|00003f80| 6e 69 6e 67 20 74 6f 20 | 74 68 65 20 6e 65 78 74 |ning to |the next|
|00003f90| 20 73 74 61 63 6b 20 66 | 72 61 6d 65 20 2a 2f 0d | stack f|rame */.|
|00003fa0| 20 20 63 68 61 72 20 2a | 66 6e 61 6d 65 3b 09 09 | char *|fname;..|
|00003fb0| 2f 2a 20 63 6f 70 69 65 | 64 20 66 72 6f 6d 20 69 |/* copie|d from i|
|00003fc0| 6e 70 75 74 20 77 68 65 | 6e 20 66 72 61 6d 65 20 |nput whe|n frame |
|00003fd0| 69 73 20 6d 61 64 65 20 | 2a 2f 0d 20 20 69 6e 74 |is made |*/. int|
|00003fe0| 20 6c 69 6e 65 6e 6f 3b | 09 09 09 2f 2a 20 73 69 | lineno;|.../* si|
|00003ff0| 6d 69 6c 61 72 6c 79 20 | 2a 2f 0d 20 20 69 6e 74 |milarly |*/. int|
|00004000| 20 69 66 5f 73 75 63 63 | 65 65 64 65 64 3b 09 09 | if_succ|eeded;..|
|00004010| 2f 2a 20 74 72 75 65 20 | 69 66 20 61 20 6c 65 67 |/* true |if a leg|
|00004020| 20 6f 66 20 74 68 69 73 | 20 69 66 2d 67 72 6f 75 | of this| if-grou|
|00004030| 70 0d 09 09 09 09 20 20 | 20 20 68 61 73 20 62 65 |p..... | has be|
|00004040| 65 6e 20 70 61 73 73 65 | 64 20 74 68 72 6f 75 67 |en passe|d throug|
|00004050| 68 20 72 65 73 63 61 6e | 20 2a 2f 0d 20 20 65 6e |h rescan| */. en|
|00004060| 75 6d 20 6e 6f 64 65 5f | 74 79 70 65 20 74 79 70 |um node_|type typ|
|00004070| 65 3b 09 09 2f 2a 20 74 | 79 70 65 20 6f 66 20 6c |e;../* t|ype of l|
|00004080| 61 73 74 20 64 69 72 65 | 63 74 69 76 65 20 73 65 |ast dire|ctive se|
|00004090| 65 6e 20 69 6e 20 74 68 | 69 73 20 67 72 6f 75 70 |en in th|is group|
|000040a0| 20 2a 2f 0d 7d 3b 0d 74 | 79 70 65 64 65 66 20 73 | */.};.t|ypedef s|
|000040b0| 74 72 75 63 74 20 69 66 | 5f 73 74 61 63 6b 20 49 |truct if|_stack I|
|000040c0| 46 5f 53 54 41 43 4b 5f | 46 52 41 4d 45 3b 0d 49 |F_STACK_|FRAME;.I|
|000040d0| 46 5f 53 54 41 43 4b 5f | 46 52 41 4d 45 20 2a 69 |F_STACK_|FRAME *i|
|000040e0| 66 5f 73 74 61 63 6b 20 | 3d 20 4e 55 4c 4c 3b 0d |f_stack |= NULL;.|
|000040f0| 0d 2f 2a 20 42 75 66 66 | 65 72 20 6f 66 20 2d 4d |./* Buff|er of -M|
|00004100| 20 6f 75 74 70 75 74 2e | 20 20 2a 2f 0d 0d 63 68 | output.| */..ch|
|00004110| 61 72 20 2a 64 65 70 73 | 5f 62 75 66 66 65 72 3b |ar *deps|_buffer;|
|00004120| 0d 0d 2f 2a 20 4e 75 6d | 62 65 72 20 6f 66 20 62 |../* Num|ber of b|
|00004130| 79 74 65 73 20 61 6c 6c | 6f 63 61 74 65 64 20 69 |ytes all|ocated i|
|00004140| 6e 20 61 62 6f 76 65 2e | 20 20 2a 2f 0d 69 6e 74 |n above.| */.int|
|00004150| 20 64 65 70 73 5f 61 6c | 6c 6f 63 61 74 65 64 5f | deps_al|located_|
|00004160| 73 69 7a 65 3b 0d 0d 2f | 2a 20 4e 75 6d 62 65 72 |size;../|* Number|
|00004170| 20 6f 66 20 62 79 74 65 | 73 20 75 73 65 64 2e 20 | of byte|s used. |
|00004180| 20 2a 2f 0d 69 6e 74 20 | 64 65 70 73 5f 73 69 7a | */.int |deps_siz|
|00004190| 65 3b 0d 0d 2f 2a 20 4e | 75 6d 62 65 72 20 6f 66 |e;../* N|umber of|
|000041a0| 20 62 79 74 65 73 20 73 | 69 6e 63 65 20 74 68 65 | bytes s|ince the|
|000041b0| 20 6c 61 73 74 20 6e 65 | 77 6c 69 6e 65 2e 20 20 | last ne|wline. |
|000041c0| 2a 2f 0d 69 6e 74 20 64 | 65 70 73 5f 63 6f 6c 75 |*/.int d|eps_colu|
|000041d0| 6d 6e 3b 0d 0d 23 69 66 | 64 65 66 20 4d 50 57 0d |mn;..#if|def MPW.|
|000041e0| 2f 2a 20 57 68 65 6e 20 | 74 72 75 65 2c 20 6c 69 |/* When |true, li|
|000041f0| 73 74 20 6f 75 74 20 74 | 68 65 20 69 6e 63 6c 75 |st out t|he inclu|
|00004200| 64 65 20 66 69 6c 65 73 | 20 61 73 20 74 68 65 79 |de files| as they|
|00004210| 27 72 65 20 62 65 69 6e | 67 20 69 6e 63 6c 75 64 |'re bein|g includ|
|00004220| 65 64 2e 20 2a 2f 0d 0d | 69 6e 74 20 64 75 6d 70 |ed. */..|int dump|
|00004230| 5f 69 6e 63 6c 75 64 65 | 73 20 3d 20 30 3b 0d 23 |_include|s = 0;.#|
|00004240| 65 6e 64 69 66 20 2f 2a | 20 4d 50 57 20 2a 2f 0d |endif /*| MPW */.|
|00004250| 2f 2a 20 4e 6f 6e 7a 65 | 72 6f 20 6d 65 61 6e 73 |/* Nonze|ro means|
|00004260| 20 2d 49 2d 20 68 61 73 | 20 62 65 65 6e 20 73 65 | -I- has| been se|
|00004270| 65 6e 2c 0d 20 20 20 73 | 6f 20 64 6f 6e 27 74 20 |en,. s|o don't |
|00004280| 6c 6f 6f 6b 20 66 6f 72 | 20 23 69 6e 63 6c 75 64 |look for| #includ|
|00004290| 65 20 22 66 6f 6f 22 20 | 74 68 65 20 73 6f 75 72 |e "foo" |the sour|
|000042a0| 63 65 2d 66 69 6c 65 20 | 64 69 72 65 63 74 6f 72 |ce-file |director|
|000042b0| 79 2e 20 20 2a 2f 0d 69 | 6e 74 20 69 67 6e 6f 72 |y. */.i|nt ignor|
|000042c0| 65 5f 73 72 63 64 69 72 | 3b 0d 0c 0d 2f 2a 20 48 |e_srcdir|;.../* H|
|000042d0| 61 6e 64 6c 65 72 20 66 | 6f 72 20 53 49 47 50 49 |andler f|or SIGPI|
|000042e0| 50 45 2e 20 20 2a 2f 0d | 0d 73 74 61 74 69 63 20 |PE. */.|.static |
|000042f0| 76 6f 69 64 0d 70 69 70 | 65 5f 63 6c 6f 73 65 64 |void.pip|e_closed|
|00004300| 20 28 29 0d 7b 0d 20 20 | 66 61 74 61 6c 20 28 22 | ().{. |fatal ("|
|00004310| 6f 75 74 70 75 74 20 70 | 69 70 65 20 68 61 73 20 |output p|ipe has |
|00004320| 62 65 65 6e 20 63 6c 6f | 73 65 64 22 29 3b 0d 7d |been clo|sed");.}|
|00004330| 0d 0d 69 6e 74 0d 6d 61 | 69 6e 20 28 61 72 67 63 |..int.ma|in (argc|
|00004340| 2c 20 61 72 67 76 29 0d | 20 20 20 20 20 69 6e 74 |, argv).| int|
|00004350| 20 61 72 67 63 3b 0d 20 | 20 20 20 20 63 68 61 72 | argc;. | char|
|00004360| 20 2a 2a 61 72 67 76 3b | 0d 7b 0d 20 20 69 6e 74 | **argv;|.{. int|
|00004370| 20 73 74 5f 6d 6f 64 65 | 3b 0d 20 20 6c 6f 6e 67 | st_mode|;. long|
|00004380| 20 73 74 5f 73 69 7a 65 | 3b 0d 20 20 63 68 61 72 | st_size|;. char|
|00004390| 20 2a 69 6e 5f 66 6e 61 | 6d 65 2c 20 2a 6f 75 74 | *in_fna|me, *out|
|000043a0| 5f 66 6e 61 6d 65 3b 0d | 20 20 69 6e 74 20 66 2c |_fname;.| int f,|
|000043b0| 20 69 3b 0d 20 20 46 49 | 4c 45 5f 42 55 46 20 2a | i;. FI|LE_BUF *|
|000043c0| 66 70 3b 0d 20 20 63 68 | 61 72 20 2a 2a 70 65 6e |fp;. ch|ar **pen|
|000043d0| 64 5f 66 69 6c 65 73 20 | 3d 20 28 63 68 61 72 20 |d_files |= (char |
|000043e0| 2a 2a 29 20 78 6d 61 6c | 6c 6f 63 20 28 61 72 67 |**) xmal|loc (arg|
|000043f0| 63 20 2a 20 73 69 7a 65 | 6f 66 20 28 63 68 61 72 |c * size|of (char|
|00004400| 20 2a 29 29 3b 0d 20 20 | 63 68 61 72 20 2a 2a 70 | *));. |char **p|
|00004410| 65 6e 64 5f 64 65 66 73 | 20 3d 20 28 63 68 61 72 |end_defs| = (char|
|00004420| 20 2a 2a 29 20 78 6d 61 | 6c 6c 6f 63 20 28 61 72 | **) xma|lloc (ar|
|00004430| 67 63 20 2a 20 73 69 7a | 65 6f 66 20 28 63 68 61 |gc * siz|eof (cha|
|00004440| 72 20 2a 29 29 3b 0d 20 | 20 63 68 61 72 20 2a 2a |r *));. | char **|
|00004450| 70 65 6e 64 5f 75 6e 64 | 65 66 73 20 3d 20 28 63 |pend_und|efs = (c|
|00004460| 68 61 72 20 2a 2a 29 20 | 78 6d 61 6c 6c 6f 63 20 |har **) |xmalloc |
|00004470| 28 61 72 67 63 20 2a 20 | 73 69 7a 65 6f 66 20 28 |(argc * |sizeof (|
|00004480| 63 68 61 72 20 2a 29 29 | 3b 0d 20 20 69 6e 74 20 |char *))|;. int |
|00004490| 69 6e 68 69 62 69 74 5f | 70 72 65 64 65 66 73 20 |inhibit_|predefs |
|000044a0| 3d 20 30 3b 0d 20 20 69 | 6e 74 20 6e 6f 5f 73 74 |= 0;. i|nt no_st|
|000044b0| 61 6e 64 61 72 64 5f 69 | 6e 63 6c 75 64 65 73 20 |andard_i|ncludes |
|000044c0| 3d 20 30 3b 0d 0d 20 20 | 2f 2a 20 4e 6f 6e 2d 30 |= 0;.. |/* Non-0|
|000044d0| 20 6d 65 61 6e 73 20 64 | 6f 6e 27 74 20 6f 75 74 | means d|on't out|
|000044e0| 70 75 74 20 74 68 65 20 | 70 72 65 70 72 6f 63 65 |put the |preproce|
|000044f0| 73 73 65 64 20 70 72 6f | 67 72 61 6d 2e 20 20 2a |ssed pro|gram. *|
|00004500| 2f 0d 20 20 69 6e 74 20 | 69 6e 68 69 62 69 74 5f |/. int |inhibit_|
|00004510| 6f 75 74 70 75 74 20 3d | 20 30 3b 0d 0d 20 20 2f |output =| 0;.. /|
|00004520| 2a 20 53 74 72 65 61 6d | 20 6f 6e 20 77 68 69 63 |* Stream| on whic|
|00004530| 68 20 74 6f 20 70 72 69 | 6e 74 20 74 68 65 20 64 |h to pri|nt the d|
|00004540| 65 70 65 6e 64 65 6e 63 | 79 20 69 6e 66 6f 72 6d |ependenc|y inform|
|00004550| 61 74 69 6f 6e 2e 20 20 | 2a 2f 0d 20 20 46 49 4c |ation. |*/. FIL|
|00004560| 45 20 2a 64 65 70 73 5f | 73 74 72 65 61 6d 20 3d |E *deps_|stream =|
|00004570| 20 30 3b 0d 20 20 2f 2a | 20 54 61 72 67 65 74 2d | 0;. /*| Target-|
|00004580| 6e 61 6d 65 20 74 6f 20 | 77 72 69 74 65 20 77 69 |name to |write wi|
|00004590| 74 68 20 74 68 65 20 64 | 65 70 65 6e 64 65 6e 63 |th the d|ependenc|
|000045a0| 79 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2e 20 20 |y inform|ation. |
|000045b0| 2a 2f 0d 20 20 63 68 61 | 72 20 2a 64 65 70 73 5f |*/. cha|r *deps_|
|000045c0| 74 61 72 67 65 74 20 3d | 20 30 3b 0d 0d 23 69 66 |target =| 0;..#if|
|000045d0| 64 65 66 20 52 4c 49 4d | 49 54 5f 53 54 41 43 4b |def RLIM|IT_STACK|
|000045e0| 0d 20 20 2f 2a 20 47 65 | 74 20 72 69 64 20 6f 66 |. /* Ge|t rid of|
|000045f0| 20 61 6e 79 20 61 76 6f | 69 64 61 62 6c 65 20 6c | any avo|idable l|
|00004600| 69 6d 69 74 20 6f 6e 20 | 73 74 61 63 6b 20 73 69 |imit on |stack si|
|00004610| 7a 65 2e 20 20 2a 2f 0d | 20 20 7b 0d 20 20 20 20 |ze. */.| {. |
|00004620| 73 74 72 75 63 74 20 72 | 6c 69 6d 69 74 20 72 6c |struct r|limit rl|
|00004630| 69 6d 3b 0d 0d 20 20 20 | 20 2f 2a 20 53 65 74 20 |im;.. | /* Set |
|00004640| 74 68 65 20 73 74 61 63 | 6b 20 6c 69 6d 69 74 20 |the stac|k limit |
|00004650| 68 75 67 65 20 73 6f 20 | 74 68 61 74 20 61 6c 6c |huge so |that all|
|00004660| 6f 63 61 20 28 70 61 72 | 74 69 63 75 6c 61 72 6c |oca (par|ticularl|
|00004670| 79 20 73 74 72 69 6e 67 | 74 61 62 0d 20 20 20 20 |y string|tab. |
|00004680| 20 2a 20 69 6e 20 64 62 | 78 72 65 61 64 2e 63 29 | * in db|xread.c)|
|00004690| 20 64 6f 65 73 20 6e 6f | 74 20 66 61 69 6c 2e 20 | does no|t fail. |
|000046a0| 2a 2f 0d 20 20 20 20 67 | 65 74 72 6c 69 6d 69 74 |*/. g|etrlimit|
|000046b0| 20 28 52 4c 49 4d 49 54 | 5f 53 54 41 43 4b 2c 20 | (RLIMIT|_STACK, |
|000046c0| 26 72 6c 69 6d 29 3b 0d | 20 20 20 20 72 6c 69 6d |&rlim);.| rlim|
|000046d0| 2e 72 6c 69 6d 5f 63 75 | 72 20 3d 20 72 6c 69 6d |.rlim_cu|r = rlim|
|000046e0| 2e 72 6c 69 6d 5f 6d 61 | 78 3b 0d 20 20 20 20 73 |.rlim_ma|x;. s|
|000046f0| 65 74 72 6c 69 6d 69 74 | 20 28 52 4c 49 4d 49 54 |etrlimit| (RLIMIT|
|00004700| 5f 53 54 41 43 4b 2c 20 | 26 72 6c 69 6d 29 3b 0d |_STACK, |&rlim);.|
|00004710| 20 20 7d 0d 23 65 6e 64 | 69 66 20 2f 2a 20 52 4c | }.#end|if /* RL|
|00004720| 49 4d 49 54 5f 53 54 41 | 43 4b 20 64 65 66 69 6e |IMIT_STA|CK defin|
|00004730| 65 64 20 2a 2f 0d 0d 20 | 20 70 72 6f 67 6e 61 6d |ed */.. | prognam|
|00004740| 65 20 3d 20 61 72 67 76 | 5b 30 5d 3b 0d 23 69 66 |e = argv|[0];.#if|
|00004750| 64 65 66 20 56 4d 53 0d | 20 20 7b 0d 20 20 20 20 |def VMS.| {. |
|00004760| 2f 2a 20 52 65 6d 6f 76 | 65 20 64 69 72 65 63 74 |/* Remov|e direct|
|00004770| 6f 72 69 65 73 20 66 72 | 6f 6d 20 50 52 4f 47 4e |ories fr|om PROGN|
|00004780| 41 4d 45 2e 20 20 2a 2f | 0d 20 20 20 20 63 68 61 |AME. */|. cha|
|00004790| 72 20 2a 73 3b 0d 20 20 | 20 20 65 78 74 65 72 6e |r *s;. | extern|
|000047a0| 20 63 68 61 72 20 2a 72 | 69 6e 64 65 78 20 28 29 | char *r|index ()|
|000047b0| 3b 0d 0d 20 20 20 20 70 | 72 6f 67 6e 61 6d 65 20 |;.. p|rogname |
|000047c0| 3d 20 73 61 76 65 73 74 | 72 69 6e 67 20 28 61 72 |= savest|ring (ar|
|000047d0| 67 76 5b 30 5d 29 3b 0d | 0d 20 20 20 20 69 66 20 |gv[0]);.|. if |
|000047e0| 28 21 28 73 20 3d 20 72 | 69 6e 64 65 78 20 28 70 |(!(s = r|index (p|
|000047f0| 72 6f 67 6e 61 6d 65 2c | 20 27 5d 27 29 29 29 0d |rogname,| ']'))).|
|00004800| 20 20 20 20 20 20 73 20 | 3d 20 72 69 6e 64 65 78 | s |= rindex|
|00004810| 20 28 70 72 6f 67 6e 61 | 6d 65 2c 20 27 3a 27 29 | (progna|me, ':')|
|00004820| 3b 0d 20 20 20 20 69 66 | 20 28 73 29 0d 20 20 20 |;. if| (s). |
|00004830| 20 20 20 73 74 72 63 70 | 79 20 28 70 72 6f 67 6e | strcp|y (progn|
|00004840| 61 6d 65 2c 20 73 2b 31 | 29 3b 0d 20 20 20 20 69 |ame, s+1|);. i|
|00004850| 66 20 28 73 20 3d 20 72 | 69 6e 64 65 78 20 28 70 |f (s = r|index (p|
|00004860| 72 6f 67 6e 61 6d 65 2c | 20 27 2e 27 29 29 0d 20 |rogname,| '.')). |
|00004870| 20 20 20 20 20 2a 73 20 | 3d 20 27 5c 30 27 3b 0d | *s |= '\0';.|
|00004880| 20 20 7d 0d 23 65 6e 64 | 69 66 0d 0d 20 20 69 6e | }.#end|if.. in|
|00004890| 5f 66 6e 61 6d 65 20 3d | 20 4e 55 4c 4c 3b 0d 20 |_fname =| NULL;. |
|000048a0| 20 6f 75 74 5f 66 6e 61 | 6d 65 20 3d 20 4e 55 4c | out_fna|me = NUL|
|000048b0| 4c 3b 0d 0d 20 20 2f 2a | 20 49 6e 69 74 69 61 6c |L;.. /*| Initial|
|000048c0| 69 7a 65 20 69 73 5f 69 | 64 63 68 61 72 20 74 6f |ize is_i|dchar to|
|000048d0| 20 61 6c 6c 6f 77 20 24 | 2e 20 20 2a 2f 0d 20 20 | allow $|. */. |
|000048e0| 64 6f 6c 6c 61 72 73 5f | 69 6e 5f 69 64 65 6e 74 |dollars_|in_ident|
|000048f0| 20 3d 20 31 3b 0d 20 20 | 69 6e 69 74 69 61 6c 69 | = 1;. |initiali|
|00004900| 7a 65 5f 63 68 61 72 5f | 73 79 6e 74 61 78 20 28 |ze_char_|syntax (|
|00004910| 29 3b 0d 20 20 64 6f 6c | 6c 61 72 73 5f 69 6e 5f |);. dol|lars_in_|
|00004920| 69 64 65 6e 74 20 3d 20 | 44 4f 4c 4c 41 52 53 5f |ident = |DOLLARS_|
|00004930| 49 4e 5f 49 44 45 4e 54 | 49 46 49 45 52 53 3b 0d |IN_IDENT|IFIERS;.|
|00004940| 0d 20 20 6e 6f 5f 6c 69 | 6e 65 5f 63 6f 6d 6d 61 |. no_li|ne_comma|
|00004950| 6e 64 73 20 3d 20 30 3b | 0d 20 20 6e 6f 5f 74 72 |nds = 0;|. no_tr|
|00004960| 69 67 72 61 70 68 73 20 | 3d 20 31 3b 0d 20 20 64 |igraphs |= 1;. d|
|00004970| 75 6d 70 5f 6d 61 63 72 | 6f 73 20 3d 20 30 3b 0d |ump_macr|os = 0;.|
|00004980| 20 20 6e 6f 5f 6f 75 74 | 70 75 74 20 3d 20 30 3b | no_out|put = 0;|
|00004990| 0d 20 20 63 70 6c 75 73 | 70 6c 75 73 20 3d 20 30 |. cplus|plus = 0|
|000049a0| 3b 0d 23 69 66 64 65 66 | 20 43 50 4c 55 53 50 4c |;.#ifdef| CPLUSPL|
|000049b0| 55 53 0d 20 20 63 70 6c | 75 73 70 6c 75 73 20 3d |US. cpl|usplus =|
|000049c0| 20 31 3b 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 6e | 1;.#end|if..#ifn|
|000049d0| 64 65 66 20 4d 50 57 0d | 20 20 73 69 67 6e 61 6c |def MPW.| signal|
|000049e0| 20 28 53 49 47 50 49 50 | 45 2c 20 70 69 70 65 5f | (SIGPIP|E, pipe_|
|000049f0| 63 6c 6f 73 65 64 29 3b | 0d 23 65 6e 64 69 66 20 |closed);|.#endif |
|00004a00| 2f 2a 20 6e 20 4d 50 57 | 20 2a 2f 0d 0d 23 69 66 |/* n MPW| */..#if|
|00004a10| 64 65 66 20 4d 50 57 0d | 20 20 2f 2a 20 50 72 65 |def MPW.| /* Pre|
|00004a20| 70 61 72 65 20 74 6f 20 | 73 70 69 6e 20 74 68 65 |pare to |spin the|
|00004a30| 20 62 65 61 63 68 20 62 | 61 6c 6c 2e 20 2a 2f 0d | beach b|all. */.|
|00004a40| 20 20 49 6e 69 74 43 75 | 72 73 6f 72 43 74 6c 20 | InitCu|rsorCtl |
|00004a50| 28 6e 69 6c 29 3b 0d 23 | 65 6e 64 69 66 20 2f 2a |(nil);.#|endif /*|
|00004a60| 20 4d 50 57 20 2a 2f 0d | 0d 23 69 66 64 65 66 20 | MPW */.|.#ifdef |
|00004a70| 4d 50 57 0d 20 20 6d 61 | 78 5f 69 6e 63 6c 75 64 |MPW. ma|x_includ|
|00004a80| 65 5f 6c 65 6e 20 3d 20 | 31 30 30 3b 20 20 2f 2a |e_len = |100; /*|
|00004a90| 20 67 65 74 73 20 67 72 | 6f 77 6e 20 6c 61 74 65 | gets gr|own late|
|00004aa0| 72 20 61 63 74 75 61 6c | 6c 79 20 28 3f 29 20 2a |r actual|ly (?) *|
|00004ab0| 2f 0d 23 65 6c 73 65 20 | 2f 2a 20 6e 6f 74 20 4d |/.#else |/* not M|
|00004ac0| 50 57 20 2a 2f 0d 23 69 | 66 6e 64 65 66 20 56 4d |PW */.#i|fndef VM|
|00004ad0| 53 0d 20 20 6d 61 78 5f | 69 6e 63 6c 75 64 65 5f |S. max_|include_|
|00004ae0| 6c 65 6e 0d 20 20 20 20 | 3d 20 6d 61 78 20 28 6d |len. |= max (m|
|00004af0| 61 78 20 28 73 69 7a 65 | 6f 66 20 28 47 43 43 5f |ax (size|of (GCC_|
|00004b00| 49 4e 43 4c 55 44 45 5f | 44 49 52 29 2c 0d 09 09 |INCLUDE_|DIR),...|
|00004b10| 73 69 7a 65 6f 66 20 28 | 47 50 4c 55 53 50 4c 55 |sizeof (|GPLUSPLU|
|00004b20| 53 5f 49 4e 43 4c 55 44 | 45 5f 44 49 52 29 29 2c |S_INCLUD|E_DIR)),|
|00004b30| 0d 09 20 20 20 73 69 7a | 65 6f 66 20 28 22 2f 75 |.. siz|eof ("/u|
|00004b40| 73 72 2f 69 6e 63 6c 75 | 64 65 2f 43 43 22 29 29 |sr/inclu|de/CC"))|
|00004b50| 3b 0d 23 65 6c 73 65 20 | 2f 2a 20 56 4d 53 20 2a |;.#else |/* VMS *|
|00004b60| 2f 0d 20 20 6d 61 78 5f | 69 6e 63 6c 75 64 65 5f |/. max_|include_|
|00004b70| 6c 65 6e 0d 20 20 20 20 | 3d 20 73 69 7a 65 6f 66 |len. |= sizeof|
|00004b80| 28 22 53 59 53 24 53 59 | 53 52 4f 4f 54 3a 5b 53 |("SYS$SY|SROOT:[S|
|00004b90| 59 53 4c 49 42 2e 5d 22 | 29 3b 0d 23 65 6e 64 69 |YSLIB.]"|);.#endi|
|00004ba0| 66 20 2f 2a 20 56 4d 53 | 20 2a 2f 0d 23 65 6e 64 |f /* VMS| */.#end|
|00004bb0| 69 66 20 2f 2a 20 4d 50 | 57 20 2a 2f 0d 0d 20 20 |if /* MP|W */.. |
|00004bc0| 62 7a 65 72 6f 20 28 70 | 65 6e 64 5f 66 69 6c 65 |bzero (p|end_file|
|00004bd0| 73 2c 20 61 72 67 63 20 | 2a 20 73 69 7a 65 6f 66 |s, argc |* sizeof|
|00004be0| 20 28 63 68 61 72 20 2a | 29 29 3b 0d 20 20 62 7a | (char *|));. bz|
|00004bf0| 65 72 6f 20 28 70 65 6e | 64 5f 64 65 66 73 2c 20 |ero (pen|d_defs, |
|00004c00| 61 72 67 63 20 2a 20 73 | 69 7a 65 6f 66 20 28 63 |argc * s|izeof (c|
|00004c10| 68 61 72 20 2a 29 29 3b | 0d 20 20 62 7a 65 72 6f |har *));|. bzero|
|00004c20| 20 28 70 65 6e 64 5f 75 | 6e 64 65 66 73 2c 20 61 | (pend_u|ndefs, a|
|00004c30| 72 67 63 20 2a 20 73 69 | 7a 65 6f 66 20 28 63 68 |rgc * si|zeof (ch|
|00004c40| 61 72 20 2a 29 29 3b 0d | 0d 20 20 2f 2a 20 50 72 |ar *));.|. /* Pr|
|00004c50| 6f 63 65 73 73 20 73 77 | 69 74 63 68 65 73 20 61 |ocess sw|itches a|
|00004c60| 6e 64 20 66 69 6e 64 20 | 69 6e 70 75 74 20 66 69 |nd find |input fi|
|00004c70| 6c 65 20 6e 61 6d 65 2e | 20 20 2a 2f 0d 0d 20 20 |le name.| */.. |
|00004c80| 66 6f 72 20 28 69 20 3d | 20 31 3b 20 69 20 3c 20 |for (i =| 1; i < |
|00004c90| 61 72 67 63 3b 20 69 2b | 2b 29 20 7b 0d 0d 23 69 |argc; i+|+) {..#i|
|00004ca0| 66 64 65 66 20 4d 50 57 | 0d 20 20 20 20 53 70 69 |fdef MPW|. Spi|
|00004cb0| 6e 43 75 72 73 6f 72 20 | 28 31 29 3b 0d 23 65 6e |nCursor |(1);.#en|
|00004cc0| 64 69 66 20 2f 2a 20 4d | 50 57 20 2a 2f 0d 0d 20 |dif /* M|PW */.. |
|00004cd0| 20 20 20 69 66 20 28 61 | 72 67 76 5b 69 5d 5b 30 | if (a|rgv[i][0|
|00004ce0| 5d 20 21 3d 20 27 2d 27 | 29 20 7b 0d 20 20 20 20 |] != '-'|) {. |
|00004cf0| 20 20 69 66 20 28 6f 75 | 74 5f 66 6e 61 6d 65 20 | if (ou|t_fname |
|00004d00| 21 3d 20 4e 55 4c 4c 29 | 0d 09 66 61 74 61 6c 20 |!= NULL)|..fatal |
|00004d10| 28 22 55 73 61 67 65 3a | 20 25 73 20 5b 73 77 69 |("Usage:| %s [swi|
|00004d20| 74 63 68 65 73 5d 20 69 | 6e 70 75 74 20 6f 75 74 |tches] i|nput out|
|00004d30| 70 75 74 22 2c 20 61 72 | 67 76 5b 30 5d 29 3b 0d |put", ar|gv[0]);.|
|00004d40| 20 20 20 20 20 20 65 6c | 73 65 20 69 66 20 28 69 | el|se if (i|
|00004d50| 6e 5f 66 6e 61 6d 65 20 | 21 3d 20 4e 55 4c 4c 29 |n_fname |!= NULL)|
|00004d60| 0d 09 6f 75 74 5f 66 6e | 61 6d 65 20 3d 20 61 72 |..out_fn|ame = ar|
|00004d70| 67 76 5b 69 5d 3b 0d 20 | 20 20 20 20 20 65 6c 73 |gv[i];. | els|
|00004d80| 65 0d 09 69 6e 5f 66 6e | 61 6d 65 20 3d 20 61 72 |e..in_fn|ame = ar|
|00004d90| 67 76 5b 69 5d 3b 0d 20 | 20 20 20 7d 20 65 6c 73 |gv[i];. | } els|
|00004da0| 65 20 7b 0d 20 20 20 20 | 20 20 73 77 69 74 63 68 |e {. | switch|
|00004db0| 20 28 61 72 67 76 5b 69 | 5d 5b 31 5d 29 20 7b 0d | (argv[i|][1]) {.|
|00004dc0| 0d 20 20 20 20 20 20 63 | 61 73 65 20 27 69 27 3a |. c|ase 'i':|
|00004dd0| 0d 09 69 66 20 28 61 72 | 67 76 5b 69 5d 5b 32 5d |..if (ar|gv[i][2]|
|00004de0| 20 21 3d 20 30 29 0d 09 | 20 20 70 65 6e 64 5f 66 | != 0)..| pend_f|
|00004df0| 69 6c 65 73 5b 69 5d 20 | 3d 20 61 72 67 76 5b 69 |iles[i] |= argv[i|
|00004e00| 5d 20 2b 20 32 3b 0d 09 | 65 6c 73 65 20 69 66 20 |] + 2;..|else if |
|00004e10| 28 69 20 2b 20 31 20 3d | 3d 20 61 72 67 63 29 0d |(i + 1 =|= argc).|
|00004e20| 09 20 20 66 61 74 61 6c | 20 28 22 46 69 6c 65 6e |. fatal| ("Filen|
|00004e30| 61 6d 65 20 6d 69 73 73 | 69 6e 67 20 61 66 74 65 |ame miss|ing afte|
|00004e40| 72 20 2d 69 20 6f 70 74 | 69 6f 6e 22 29 3b 0d 09 |r -i opt|ion");..|
|00004e50| 65 6c 73 65 0d 09 20 20 | 70 65 6e 64 5f 66 69 6c |else.. |pend_fil|
|00004e60| 65 73 5b 69 5d 20 3d 20 | 61 72 67 76 5b 69 2b 31 |es[i] = |argv[i+1|
|00004e70| 5d 2c 20 69 2b 2b 3b 0d | 09 62 72 65 61 6b 3b 0d |], i++;.|.break;.|
|00004e80| 0d 20 20 20 20 20 20 63 | 61 73 65 20 27 6f 27 3a |. c|ase 'o':|
|00004e90| 0d 09 69 66 20 28 6f 75 | 74 5f 66 6e 61 6d 65 20 |..if (ou|t_fname |
|00004ea0| 21 3d 20 4e 55 4c 4c 29 | 0d 09 20 20 66 61 74 61 |!= NULL)|.. fata|
|00004eb0| 6c 20 28 22 4f 75 74 70 | 75 74 20 66 69 6c 65 6e |l ("Outp|ut filen|
|00004ec0| 61 6d 65 20 73 70 65 63 | 69 66 69 65 64 20 74 77 |ame spec|ified tw|
|00004ed0| 69 63 65 22 29 3b 0d 09 | 69 66 20 28 69 20 2b 20 |ice");..|if (i + |
|00004ee0| 31 20 3d 3d 20 61 72 67 | 63 29 0d 09 20 20 66 61 |1 == arg|c).. fa|
|00004ef0| 74 61 6c 20 28 22 46 69 | 6c 65 6e 61 6d 65 20 6d |tal ("Fi|lename m|
|00004f00| 69 73 73 69 6e 67 20 61 | 66 74 65 72 20 2d 6f 20 |issing a|fter -o |
|00004f10| 6f 70 74 69 6f 6e 22 29 | 3b 0d 09 6f 75 74 5f 66 |option")|;..out_f|
|00004f20| 6e 61 6d 65 20 3d 20 61 | 72 67 76 5b 2b 2b 69 5d |name = a|rgv[++i]|
|00004f30| 3b 0d 09 69 66 20 28 21 | 73 74 72 63 6d 70 20 28 |;..if (!|strcmp (|
|00004f40| 6f 75 74 5f 66 6e 61 6d | 65 2c 20 22 2d 22 29 29 |out_fnam|e, "-"))|
|00004f50| 0d 09 20 20 6f 75 74 5f | 66 6e 61 6d 65 20 3d 20 |.. out_|fname = |
|00004f60| 22 22 3b 0d 09 62 72 65 | 61 6b 3b 0d 0d 20 20 20 |"";..bre|ak;.. |
|00004f70| 20 20 20 63 61 73 65 20 | 27 70 27 3a 0d 09 70 65 | case |'p':..pe|
|00004f80| 64 61 6e 74 69 63 20 3d | 20 31 3b 0d 09 62 72 65 |dantic =| 1;..bre|
|00004f90| 61 6b 3b 0d 0d 20 20 20 | 20 20 20 63 61 73 65 20 |ak;.. | case |
|00004fa0| 27 74 27 3a 0d 09 69 66 | 20 28 21 73 74 72 63 6d |'t':..if| (!strcm|
|00004fb0| 70 20 28 61 72 67 76 5b | 69 5d 2c 20 22 2d 74 72 |p (argv[|i], "-tr|
|00004fc0| 61 64 69 74 69 6f 6e 61 | 6c 22 29 29 20 7b 0d 09 |aditiona|l")) {..|
|00004fd0| 20 20 74 72 61 64 69 74 | 69 6f 6e 61 6c 20 3d 20 | tradit|ional = |
|00004fe0| 31 3b 0d 09 20 20 64 6f | 6c 6c 61 72 73 5f 69 6e |1;.. do|llars_in|
|00004ff0| 5f 69 64 65 6e 74 20 3d | 20 31 3b 0d 09 7d 20 65 |_ident =| 1;..} e|
|00005000| 6c 73 65 20 69 66 20 28 | 21 73 74 72 63 6d 70 20 |lse if (|!strcmp |
|00005010| 28 61 72 67 76 5b 69 5d | 2c 20 22 2d 74 72 69 67 |(argv[i]|, "-trig|
|00005020| 72 61 70 68 73 22 29 29 | 20 7b 0d 09 20 20 6e 6f |raphs"))| {.. no|
|00005030| 5f 74 72 69 67 72 61 70 | 68 73 20 3d 20 30 3b 0d |_trigrap|hs = 0;.|
|00005040| 09 7d 0d 09 62 72 65 61 | 6b 3b 0d 0d 20 20 20 20 |.}..brea|k;.. |
|00005050| 20 20 63 61 73 65 20 27 | 2b 27 3a 0d 09 63 70 6c | case '|+':..cpl|
|00005060| 75 73 70 6c 75 73 20 3d | 20 31 3b 0d 09 62 72 65 |usplus =| 1;..bre|
|00005070| 61 6b 3b 0d 0d 20 20 20 | 20 20 20 63 61 73 65 20 |ak;.. | case |
|00005080| 27 57 27 3a 0d 09 69 66 | 20 28 21 73 74 72 63 6d |'W':..if| (!strcm|
|00005090| 70 20 28 61 72 67 76 5b | 69 5d 2c 20 22 2d 57 74 |p (argv[|i], "-Wt|
|000050a0| 72 69 67 72 61 70 68 73 | 22 29 29 20 7b 0d 09 20 |rigraphs|")) {.. |
|000050b0| 20 77 61 72 6e 5f 74 72 | 69 67 72 61 70 68 73 20 | warn_tr|igraphs |
|000050c0| 3d 20 31 3b 0d 09 7d 0d | 09 69 66 20 28 21 73 74 |= 1;..}.|.if (!st|
|000050d0| 72 63 6d 70 20 28 61 72 | 67 76 5b 69 5d 2c 20 22 |rcmp (ar|gv[i], "|
|000050e0| 2d 57 63 6f 6d 6d 65 6e | 74 73 22 29 29 0d 09 20 |-Wcommen|ts")).. |
|000050f0| 20 77 61 72 6e 5f 63 6f | 6d 6d 65 6e 74 73 20 3d | warn_co|mments =|
|00005100| 20 31 3b 0d 09 69 66 20 | 28 21 73 74 72 63 6d 70 | 1;..if |(!strcmp|
|00005110| 20 28 61 72 67 76 5b 69 | 5d 2c 20 22 2d 57 63 6f | (argv[i|], "-Wco|
|00005120| 6d 6d 65 6e 74 22 29 29 | 0d 09 20 20 77 61 72 6e |mment"))|.. warn|
|00005130| 5f 63 6f 6d 6d 65 6e 74 | 73 20 3d 20 31 3b 0d 09 |_comment|s = 1;..|
|00005140| 69 66 20 28 21 73 74 72 | 63 6d 70 20 28 61 72 67 |if (!str|cmp (arg|
|00005150| 76 5b 69 5d 2c 20 22 2d | 57 61 6c 6c 22 29 29 20 |v[i], "-|Wall")) |
|00005160| 7b 0d 09 20 20 77 61 72 | 6e 5f 74 72 69 67 72 61 |{.. war|n_trigra|
|00005170| 70 68 73 20 3d 20 31 3b | 0d 09 20 20 77 61 72 6e |phs = 1;|.. warn|
|00005180| 5f 63 6f 6d 6d 65 6e 74 | 73 20 3d 20 31 3b 0d 09 |_comment|s = 1;..|
|00005190| 7d 0d 09 62 72 65 61 6b | 3b 0d 0d 20 20 20 20 20 |}..break|;.. |
|000051a0| 20 63 61 73 65 20 27 4d | 27 3a 0d 09 69 66 20 28 | case 'M|':..if (|
|000051b0| 21 73 74 72 63 6d 70 20 | 28 61 72 67 76 5b 69 5d |!strcmp |(argv[i]|
|000051c0| 2c 20 22 2d 4d 22 29 29 | 0d 09 20 20 70 72 69 6e |, "-M"))|.. prin|
|000051d0| 74 5f 64 65 70 73 20 3d | 20 32 3b 0d 09 65 6c 73 |t_deps =| 2;..els|
|000051e0| 65 20 69 66 20 28 21 73 | 74 72 63 6d 70 20 28 61 |e if (!s|trcmp (a|
|000051f0| 72 67 76 5b 69 5d 2c 20 | 22 2d 4d 4d 22 29 29 0d |rgv[i], |"-MM")).|
|00005200| 09 20 20 70 72 69 6e 74 | 5f 64 65 70 73 20 3d 20 |. print|_deps = |
|00005210| 31 3b 0d 09 69 6e 68 69 | 62 69 74 5f 6f 75 74 70 |1;..inhi|bit_outp|
|00005220| 75 74 20 3d 20 31 3b 0d | 09 62 72 65 61 6b 3b 0d |ut = 1;.|.break;.|
|00005230| 0d 20 20 20 20 20 20 63 | 61 73 65 20 27 64 27 3a |. c|ase 'd':|
|00005240| 0d 09 64 75 6d 70 5f 6d | 61 63 72 6f 73 20 3d 20 |..dump_m|acros = |
|00005250| 31 3b 0d 09 6e 6f 5f 6f | 75 74 70 75 74 20 3d 20 |1;..no_o|utput = |
|00005260| 31 3b 0d 09 62 72 65 61 | 6b 3b 0d 0d 20 20 20 20 |1;..brea|k;.. |
|00005270| 20 20 63 61 73 65 20 27 | 76 27 3a 0d 09 66 70 72 | case '|v':..fpr|
|00005280| 69 6e 74 66 20 28 73 74 | 64 65 72 72 2c 20 22 47 |intf (st|derr, "G|
|00005290| 4e 55 20 43 50 50 20 76 | 65 72 73 69 6f 6e 20 25 |NU CPP v|ersion %|
|000052a0| 73 5c 6e 22 2c 20 76 65 | 72 73 69 6f 6e 5f 73 74 |s\n", ve|rsion_st|
|000052b0| 72 69 6e 67 29 3b 0d 23 | 69 66 64 65 66 20 4d 50 |ring);.#|ifdef MP|
|000052c0| 57 0d 09 2f 2a 20 45 6e | 61 62 6c 65 20 74 68 65 |W../* En|able the|
|000052d0| 20 64 69 73 70 6c 61 79 | 20 6f 66 20 61 6c 6c 20 | display| of all |
|000052e0| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 73 2e 20 2a |include |files. *|
|000052f0| 2f 0d 09 64 75 6d 70 5f | 69 6e 63 6c 75 64 65 73 |/..dump_|includes|
|00005300| 20 3d 20 31 3b 0d 23 65 | 6e 64 69 66 20 2f 2a 20 | = 1;.#e|ndif /* |
|00005310| 4d 50 57 20 2a 2f 0d 09 | 62 72 65 61 6b 3b 0d 0d |MPW */..|break;..|
|00005320| 20 20 20 20 20 20 63 61 | 73 65 20 27 44 27 3a 0d | ca|se 'D':.|
|00005330| 09 7b 0d 09 20 20 63 68 | 61 72 20 2a 70 2c 20 2a |.{.. ch|ar *p, *|
|00005340| 70 31 3b 0d 0d 09 20 20 | 69 66 20 28 61 72 67 76 |p1;... |if (argv|
|00005350| 5b 69 5d 5b 32 5d 20 21 | 3d 20 30 29 0d 09 20 20 |[i][2] !|= 0).. |
|00005360| 20 20 70 20 3d 20 61 72 | 67 76 5b 69 5d 20 2b 20 | p = ar|gv[i] + |
|00005370| 32 3b 0d 09 20 20 65 6c | 73 65 20 69 66 20 28 69 |2;.. el|se if (i|
|00005380| 20 2b 20 31 20 3d 3d 20 | 61 72 67 63 29 0d 09 20 | + 1 == |argc).. |
|00005390| 20 20 20 66 61 74 61 6c | 20 28 22 4d 61 63 72 6f | fatal| ("Macro|
|000053a0| 20 6e 61 6d 65 20 6d 69 | 73 73 69 6e 67 20 61 66 | name mi|ssing af|
|000053b0| 74 65 72 20 2d 44 20 6f | 70 74 69 6f 6e 22 29 3b |ter -D o|ption");|
|000053c0| 0d 09 20 20 65 6c 73 65 | 0d 09 20 20 20 20 70 20 |.. else|.. p |
|000053d0| 3d 20 61 72 67 76 5b 2b | 2b 69 5d 3b 0d 0d 09 20 |= argv[+|+i];... |
|000053e0| 20 69 66 20 28 28 70 31 | 20 3d 20 28 63 68 61 72 | if ((p1| = (char|
|000053f0| 20 2a 29 20 69 6e 64 65 | 78 20 28 70 2c 20 27 3d | *) inde|x (p, '=|
|00005400| 27 29 29 20 21 3d 20 4e | 55 4c 4c 29 0d 09 20 20 |')) != N|ULL).. |
|00005410| 20 20 2a 70 31 20 3d 20 | 27 20 27 3b 0d 09 20 20 | *p1 = |' ';.. |
|00005420| 70 65 6e 64 5f 64 65 66 | 73 5b 69 5d 20 3d 20 70 |pend_def|s[i] = p|
|00005430| 3b 0d 09 7d 0d 09 62 72 | 65 61 6b 3b 0d 0d 20 20 |;..}..br|eak;.. |
|00005440| 20 20 20 20 63 61 73 65 | 20 27 55 27 3a 09 09 2f | case| 'U':../|
|00005450| 2a 20 4a 46 20 23 75 6e | 64 65 66 20 73 6f 6d 65 |* JF #un|def some|
|00005460| 74 68 69 6e 67 20 2a 2f | 0d 09 69 66 20 28 61 72 |thing */|..if (ar|
|00005470| 67 76 5b 69 5d 5b 32 5d | 20 21 3d 20 30 29 0d 09 |gv[i][2]| != 0)..|
|00005480| 20 20 70 65 6e 64 5f 75 | 6e 64 65 66 73 5b 69 5d | pend_u|ndefs[i]|
|00005490| 20 3d 20 61 72 67 76 5b | 69 5d 20 2b 20 32 3b 0d | = argv[|i] + 2;.|
|000054a0| 09 65 6c 73 65 20 69 66 | 20 28 69 20 2b 20 31 20 |.else if| (i + 1 |
|000054b0| 3d 3d 20 61 72 67 63 29 | 0d 09 20 20 66 61 74 61 |== argc)|.. fata|
|000054c0| 6c 20 28 22 4d 61 63 72 | 6f 20 6e 61 6d 65 20 6d |l ("Macr|o name m|
|000054d0| 69 73 73 69 6e 67 20 61 | 66 74 65 72 20 2d 55 20 |issing a|fter -U |
|000054e0| 6f 70 74 69 6f 6e 22 29 | 3b 0d 09 65 6c 73 65 0d |option")|;..else.|
|000054f0| 09 20 20 70 65 6e 64 5f | 75 6e 64 65 66 73 5b 69 |. pend_|undefs[i|
|00005500| 5d 20 3d 20 61 72 67 76 | 5b 69 2b 31 5d 2c 20 69 |] = argv|[i+1], i|
|00005510| 2b 2b 3b 0d 09 62 72 65 | 61 6b 3b 0d 0d 20 20 20 |++;..bre|ak;.. |
|00005520| 20 20 20 63 61 73 65 20 | 27 43 27 3a 0d 09 70 75 | case |'C':..pu|
|00005530| 74 5f 6f 75 74 5f 63 6f | 6d 6d 65 6e 74 73 20 3d |t_out_co|mments =|
|00005540| 20 31 3b 0d 09 62 72 65 | 61 6b 3b 0d 0d 20 20 20 | 1;..bre|ak;.. |
|00005550| 20 20 20 63 61 73 65 20 | 27 45 27 3a 09 09 09 2f | case |'E':.../|
|00005560| 2a 20 2d 45 20 63 6f 6d | 65 73 20 66 72 6f 6d 20 |* -E com|es from |
|00005570| 63 63 20 2d 45 3b 20 69 | 67 6e 6f 72 65 20 69 74 |cc -E; i|gnore it|
|00005580| 2e 20 20 2a 2f 0d 09 62 | 72 65 61 6b 3b 0d 0d 20 |. */..b|reak;.. |
|00005590| 20 20 20 20 20 63 61 73 | 65 20 27 50 27 3a 0d 09 | cas|e 'P':..|
|000055a0| 6e 6f 5f 6c 69 6e 65 5f | 63 6f 6d 6d 61 6e 64 73 |no_line_|commands|
|000055b0| 20 3d 20 31 3b 0d 09 62 | 72 65 61 6b 3b 0d 0d 20 | = 1;..b|reak;.. |
|000055c0| 20 20 20 20 20 63 61 73 | 65 20 27 24 27 3a 09 09 | cas|e '$':..|
|000055d0| 09 2f 2a 20 44 6f 6e 27 | 74 20 69 6e 63 6c 75 64 |./* Don'|t includ|
|000055e0| 65 20 24 20 69 6e 20 69 | 64 65 6e 74 69 66 69 65 |e $ in i|dentifie|
|000055f0| 72 73 2e 20 20 2a 2f 0d | 09 64 6f 6c 6c 61 72 73 |rs. */.|.dollars|
|00005600| 5f 69 6e 5f 69 64 65 6e | 74 20 3d 20 30 3b 0d 09 |_in_iden|t = 0;..|
|00005610| 62 72 65 61 6b 3b 0d 0d | 20 20 20 20 20 20 63 61 |break;..| ca|
|00005620| 73 65 20 27 49 27 3a 09 | 09 09 2f 2a 20 41 64 64 |se 'I':.|../* Add|
|00005630| 20 64 69 72 65 63 74 6f | 72 79 20 74 6f 20 70 61 | directo|ry to pa|
|00005640| 74 68 20 66 6f 72 20 69 | 6e 63 6c 75 64 65 73 2e |th for i|ncludes.|
|00005650| 20 20 2a 2f 0d 09 7b 0d | 09 20 20 73 74 72 75 63 | */..{.|. struc|
|00005660| 74 20 66 69 6c 65 5f 6e | 61 6d 65 5f 6c 69 73 74 |t file_n|ame_list|
|00005670| 20 2a 64 69 72 74 6d 70 | 3b 0d 0d 09 20 20 69 66 | *dirtmp|;... if|
|00005680| 20 28 21 20 69 67 6e 6f | 72 65 5f 73 72 63 64 69 | (! igno|re_srcdi|
|00005690| 72 20 26 26 20 21 73 74 | 72 63 6d 70 20 28 61 72 |r && !st|rcmp (ar|
|000056a0| 67 76 5b 69 5d 20 2b 20 | 32 2c 20 22 2d 22 29 29 |gv[i] + |2, "-"))|
|000056b0| 0d 09 20 20 20 20 69 67 | 6e 6f 72 65 5f 73 72 63 |.. ig|nore_src|
|000056c0| 64 69 72 20 3d 20 31 3b | 0d 09 20 20 65 6c 73 65 |dir = 1;|.. else|
|000056d0| 20 7b 0d 23 69 66 64 65 | 66 20 4d 50 57 0d 09 20 | {.#ifde|f MPW.. |
|000056e0| 20 20 20 2f 2a 20 4d 50 | 57 20 61 6c 6c 6f 77 73 | /* MP|W allows|
|000056f0| 20 63 6f 6d 6d 61 2d 73 | 65 70 61 72 61 74 65 64 | comma-s|eparated|
|00005700| 20 6c 69 73 74 20 6f 66 | 20 66 6f 6c 64 65 72 73 | list of| folders|
|00005710| 2c 20 6a 75 73 74 20 61 | 73 20 77 69 74 68 20 74 |, just a|s with t|
|00005720| 68 65 0d 09 20 20 20 20 | 20 20 20 65 6e 76 20 76 |he.. | env v|
|00005730| 61 72 69 61 62 6c 65 3b | 20 74 61 6b 65 20 74 68 |ariable;| take th|
|00005740| 65 20 6c 69 73 74 20 61 | 70 61 72 74 20 68 65 72 |e list a|part her|
|00005750| 65 20 28 77 65 20 61 73 | 73 75 6d 65 20 74 68 61 |e (we as|sume tha|
|00005760| 74 20 74 68 65 0d 09 20 | 20 20 20 20 20 20 63 6f |t the.. | co|
|00005770| 6d 6d 61 6e 64 20 6f 70 | 74 69 6f 6e 20 73 74 72 |mmand op|tion str|
|00005780| 69 6e 67 20 69 73 20 62 | 61 73 68 61 62 6c 65 29 |ing is b|ashable)|
|00005790| 2e 20 2a 2f 0d 09 20 20 | 20 20 63 68 61 72 20 2a |. */.. | char *|
|000057a0| 74 68 69 73 69 6e 63 6c | 75 64 65 2c 20 2a 6e 65 |thisincl|ude, *ne|
|000057b0| 78 74 69 6e 63 6c 75 64 | 65 3b 0d 0d 09 20 20 20 |xtinclud|e;... |
|000057c0| 20 69 66 20 28 61 72 67 | 76 5b 69 5d 5b 32 5d 20 | if (arg|v[i][2] |
|000057d0| 21 3d 20 30 29 0d 09 20 | 20 20 20 20 20 74 68 69 |!= 0).. | thi|
|000057e0| 73 69 6e 63 6c 75 64 65 | 20 3d 20 61 72 67 76 5b |sinclude| = argv[|
|000057f0| 69 5d 20 2b 20 32 3b 0d | 09 20 20 20 20 65 6c 73 |i] + 2;.|. els|
|00005800| 65 20 69 66 20 28 69 20 | 2b 20 31 20 3d 3d 20 61 |e if (i |+ 1 == a|
|00005810| 72 67 63 29 0d 09 20 20 | 20 20 20 20 66 61 74 61 |rgc).. | fata|
|00005820| 6c 20 28 22 44 69 72 65 | 63 74 6f 72 79 20 6e 61 |l ("Dire|ctory na|
|00005830| 6d 65 20 6d 69 73 73 69 | 6e 67 20 61 66 74 65 72 |me missi|ng after|
|00005840| 20 2d 49 20 6f 70 74 69 | 6f 6e 22 29 3b 0d 09 20 | -I opti|on");.. |
|00005850| 20 20 20 65 6c 73 65 0d | 09 20 20 20 20 20 20 74 | else.|. t|
|00005860| 68 69 73 69 6e 63 6c 75 | 64 65 20 3d 20 61 72 67 |hisinclu|de = arg|
|00005870| 76 5b 2b 2b 69 5d 3b 0d | 0d 09 20 20 20 20 77 68 |v[++i];.|.. wh|
|00005880| 69 6c 65 20 28 74 68 69 | 73 69 6e 63 6c 75 64 65 |ile (thi|sinclude|
|00005890| 20 21 3d 20 4e 55 4c 4c | 29 0d 09 20 20 20 20 20 | != NULL|).. |
|000058a0| 20 7b 0d 09 09 6e 65 78 | 74 69 6e 63 6c 75 64 65 | {...nex|tinclude|
|000058b0| 20 3d 20 28 63 68 61 72 | 20 2a 29 20 69 6e 64 65 | = (char| *) inde|
|000058c0| 78 28 74 68 69 73 69 6e | 63 6c 75 64 65 2c 20 27 |x(thisin|clude, '|
|000058d0| 2c 27 29 3b 0d 09 09 64 | 69 72 74 6d 70 20 3d 20 |,');...d|irtmp = |
|000058e0| 28 73 74 72 75 63 74 20 | 66 69 6c 65 5f 6e 61 6d |(struct |file_nam|
|000058f0| 65 5f 6c 69 73 74 20 2a | 29 0d 09 09 20 20 78 6d |e_list *|)... xm|
|00005900| 61 6c 6c 6f 63 20 28 73 | 69 7a 65 6f 66 20 28 73 |alloc (s|izeof (s|
|00005910| 74 72 75 63 74 20 66 69 | 6c 65 5f 6e 61 6d 65 5f |truct fi|le_name_|
|00005920| 6c 69 73 74 29 29 3b 0d | 09 09 64 69 72 74 6d 70 |list));.|..dirtmp|
|00005930| 2d 3e 6e 65 78 74 20 3d | 20 30 3b 09 09 2f 2a 20 |->next =| 0;../* |
|00005940| 4e 65 77 20 6f 6e 65 20 | 67 6f 65 73 20 6f 6e 20 |New one |goes on |
|00005950| 74 68 65 20 65 6e 64 20 | 2a 2f 0d 09 09 69 66 20 |the end |*/...if |
|00005960| 28 69 6e 63 6c 75 64 65 | 20 3d 3d 20 30 29 0d 09 |(include| == 0)..|
|00005970| 09 20 20 69 6e 63 6c 75 | 64 65 20 3d 20 64 69 72 |. inclu|de = dir|
|00005980| 74 6d 70 3b 0d 09 09 65 | 6c 73 65 0d 09 09 20 20 |tmp;...e|lse... |
|00005990| 6c 61 73 74 5f 69 6e 63 | 6c 75 64 65 2d 3e 6e 65 |last_inc|lude->ne|
|000059a0| 78 74 20 3d 20 64 69 72 | 74 6d 70 3b 0d 09 09 6c |xt = dir|tmp;...l|
|000059b0| 61 73 74 5f 69 6e 63 6c | 75 64 65 20 3d 20 64 69 |ast_incl|ude = di|
|000059c0| 72 74 6d 70 3b 09 2f 2a | 20 54 61 69 6c 20 66 6f |rtmp;./*| Tail fo|
|000059d0| 6c 6c 6f 77 73 20 74 68 | 65 20 6c 61 73 74 20 6f |llows th|e last o|
|000059e0| 6e 65 20 2a 2f 0d 09 09 | 64 69 72 74 6d 70 2d 3e |ne */...|dirtmp->|
|000059f0| 66 6e 61 6d 65 20 3d 20 | 74 68 69 73 69 6e 63 6c |fname = |thisincl|
|00005a00| 75 64 65 3b 0d 09 09 2f | 2a 20 62 61 73 68 20 74 |ude;.../|* bash t|
|00005a10| 68 65 20 63 6f 6d 6d 61 | 2c 20 74 68 75 73 20 6d |he comma|, thus m|
|00005a20| 61 6b 69 6e 67 20 61 20 | 67 6f 6f 64 20 6e 61 6d |aking a |good nam|
|00005a30| 65 20 2a 2f 0d 09 09 69 | 66 20 28 6e 65 78 74 69 |e */...i|f (nexti|
|00005a40| 6e 63 6c 75 64 65 20 21 | 3d 20 4e 55 4c 4c 29 20 |nclude !|= NULL) |
|00005a50| 2a 6e 65 78 74 69 6e 63 | 6c 75 64 65 2b 2b 20 3d |*nextinc|lude++ =|
|00005a60| 20 27 5c 30 27 3b 0d 09 | 09 69 66 20 28 73 74 72 | '\0';..|.if (str|
|00005a70| 6c 65 6e 20 28 64 69 72 | 74 6d 70 2d 3e 66 6e 61 |len (dir|tmp->fna|
|00005a80| 6d 65 29 20 3e 20 6d 61 | 78 5f 69 6e 63 6c 75 64 |me) > ma|x_includ|
|00005a90| 65 5f 6c 65 6e 29 0d 09 | 09 20 20 6d 61 78 5f 69 |e_len)..|. max_i|
|00005aa0| 6e 63 6c 75 64 65 5f 6c | 65 6e 20 3d 20 73 74 72 |nclude_l|en = str|
|00005ab0| 6c 65 6e 20 28 64 69 72 | 74 6d 70 2d 3e 66 6e 61 |len (dir|tmp->fna|
|00005ac0| 6d 65 29 3b 0d 09 09 74 | 68 69 73 69 6e 63 6c 75 |me);...t|hisinclu|
|00005ad0| 64 65 20 3d 20 6e 65 78 | 74 69 6e 63 6c 75 64 65 |de = nex|tinclude|
|00005ae0| 3b 0d 09 20 20 20 20 20 | 20 7d 0d 23 65 6c 73 65 |;.. | }.#else|
|00005af0| 20 2f 2a 20 6e 6f 74 20 | 4d 50 57 20 2a 2f 0d 09 | /* not |MPW */..|
|00005b00| 20 20 20 20 64 69 72 74 | 6d 70 20 3d 20 28 73 74 | dirt|mp = (st|
|00005b10| 72 75 63 74 20 66 69 6c | 65 5f 6e 61 6d 65 5f 6c |ruct fil|e_name_l|
|00005b20| 69 73 74 20 2a 29 0d 09 | 20 20 20 20 20 20 78 6d |ist *)..| xm|
|00005b30| 61 6c 6c 6f 63 20 28 73 | 69 7a 65 6f 66 20 28 73 |alloc (s|izeof (s|
|00005b40| 74 72 75 63 74 20 66 69 | 6c 65 5f 6e 61 6d 65 5f |truct fi|le_name_|
|00005b50| 6c 69 73 74 29 29 3b 0d | 09 20 20 20 20 64 69 72 |list));.|. dir|
|00005b60| 74 6d 70 2d 3e 6e 65 78 | 74 20 3d 20 30 3b 09 09 |tmp->nex|t = 0;..|
|00005b70| 2f 2a 20 4e 65 77 20 6f | 6e 65 20 67 6f 65 73 20 |/* New o|ne goes |
|00005b80| 6f 6e 20 74 68 65 20 65 | 6e 64 20 2a 2f 0d 09 20 |on the e|nd */.. |
|00005b90| 20 20 20 69 66 20 28 69 | 6e 63 6c 75 64 65 20 3d | if (i|nclude =|
|00005ba0| 3d 20 30 29 0d 09 20 20 | 20 20 20 20 69 6e 63 6c |= 0).. | incl|
|00005bb0| 75 64 65 20 3d 20 64 69 | 72 74 6d 70 3b 0d 09 20 |ude = di|rtmp;.. |
|00005bc0| 20 20 20 65 6c 73 65 0d | 09 20 20 20 20 20 20 6c | else.|. l|
|00005bd0| 61 73 74 5f 69 6e 63 6c | 75 64 65 2d 3e 6e 65 78 |ast_incl|ude->nex|
|00005be0| 74 20 3d 20 64 69 72 74 | 6d 70 3b 0d 09 20 20 20 |t = dirt|mp;.. |
|00005bf0| 20 6c 61 73 74 5f 69 6e | 63 6c 75 64 65 20 3d 20 | last_in|clude = |
|00005c00| 64 69 72 74 6d 70 3b 09 | 2f 2a 20 54 61 69 6c 20 |dirtmp;.|/* Tail |
|00005c10| 66 6f 6c 6c 6f 77 73 20 | 74 68 65 20 6c 61 73 74 |follows |the last|
|00005c20| 20 6f 6e 65 20 2a 2f 0d | 09 20 20 20 20 69 66 20 | one */.|. if |
|00005c30| 28 61 72 67 76 5b 69 5d | 5b 32 5d 20 21 3d 20 30 |(argv[i]|[2] != 0|
|00005c40| 29 0d 09 20 20 20 20 20 | 20 64 69 72 74 6d 70 2d |).. | dirtmp-|
|00005c50| 3e 66 6e 61 6d 65 20 3d | 20 61 72 67 76 5b 69 5d |>fname =| argv[i]|
|00005c60| 20 2b 20 32 3b 0d 09 20 | 20 20 20 65 6c 73 65 20 | + 2;.. | else |
|00005c70| 69 66 20 28 69 20 2b 20 | 31 20 3d 3d 20 61 72 67 |if (i + |1 == arg|
|00005c80| 63 29 0d 09 20 20 20 20 | 20 20 66 61 74 61 6c 20 |c).. | fatal |
|00005c90| 28 22 44 69 72 65 63 74 | 6f 72 79 20 6e 61 6d 65 |("Direct|ory name|
|00005ca0| 20 6d 69 73 73 69 6e 67 | 20 61 66 74 65 72 20 2d | missing| after -|
|00005cb0| 49 20 6f 70 74 69 6f 6e | 22 29 3b 0d 09 20 20 20 |I option|");.. |
|00005cc0| 20 65 6c 73 65 0d 09 20 | 20 20 20 20 20 64 69 72 | else.. | dir|
|00005cd0| 74 6d 70 2d 3e 66 6e 61 | 6d 65 20 3d 20 61 72 67 |tmp->fna|me = arg|
|00005ce0| 76 5b 2b 2b 69 5d 3b 0d | 09 20 20 20 20 69 66 20 |v[++i];.|. if |
|00005cf0| 28 73 74 72 6c 65 6e 20 | 28 64 69 72 74 6d 70 2d |(strlen |(dirtmp-|
|00005d00| 3e 66 6e 61 6d 65 29 20 | 3e 20 6d 61 78 5f 69 6e |>fname) |> max_in|
|00005d10| 63 6c 75 64 65 5f 6c 65 | 6e 29 0d 09 20 20 20 20 |clude_le|n).. |
|00005d20| 20 20 6d 61 78 5f 69 6e | 63 6c 75 64 65 5f 6c 65 | max_in|clude_le|
|00005d30| 6e 20 3d 20 73 74 72 6c | 65 6e 20 28 64 69 72 74 |n = strl|en (dirt|
|00005d40| 6d 70 2d 3e 66 6e 61 6d | 65 29 3b 0d 23 65 6e 64 |mp->fnam|e);.#end|
|00005d50| 69 66 20 2f 2a 20 4d 50 | 57 20 2a 2f 0d 09 20 20 |if /* MP|W */.. |
|00005d60| 20 20 69 66 20 28 69 67 | 6e 6f 72 65 5f 73 72 63 | if (ig|nore_src|
|00005d70| 64 69 72 20 26 26 20 66 | 69 72 73 74 5f 62 72 61 |dir && f|irst_bra|
|00005d80| 63 6b 65 74 5f 69 6e 63 | 6c 75 64 65 20 3d 3d 20 |cket_inc|lude == |
|00005d90| 30 29 0d 09 20 20 20 20 | 20 20 66 69 72 73 74 5f |0).. | first_|
|00005da0| 62 72 61 63 6b 65 74 5f | 69 6e 63 6c 75 64 65 20 |bracket_|include |
|00005db0| 3d 20 64 69 72 74 6d 70 | 3b 0d 09 20 20 20 20 7d |= dirtmp|;.. }|
|00005dc0| 0d 09 7d 0d 09 62 72 65 | 61 6b 3b 0d 0d 20 20 20 |..}..bre|ak;.. |
|00005dd0| 20 20 20 63 61 73 65 20 | 27 6e 27 3a 0d 09 2f 2a | case |'n':../*|
|00005de0| 20 2d 6e 6f 73 74 64 69 | 6e 63 20 63 61 75 73 65 | -nostdi|nc cause|
|00005df0| 73 20 6e 6f 20 64 65 66 | 61 75 6c 74 20 69 6e 63 |s no def|ault inc|
|00005e00| 6c 75 64 65 20 64 69 72 | 65 63 74 6f 72 69 65 73 |lude dir|ectories|
|00005e10| 2e 0d 09 20 20 20 59 6f | 75 20 6d 75 73 74 20 73 |... Yo|u must s|
|00005e20| 70 65 63 69 66 79 20 61 | 6c 6c 20 69 6e 63 6c 75 |pecify a|ll inclu|
|00005e30| 64 65 2d 66 69 6c 65 20 | 64 69 72 65 63 74 6f 72 |de-file |director|
|00005e40| 69 65 73 20 77 69 74 68 | 20 2d 49 2e 20 20 2a 2f |ies with| -I. */|
|00005e50| 0d 09 6e 6f 5f 73 74 61 | 6e 64 61 72 64 5f 69 6e |..no_sta|ndard_in|
|00005e60| 63 6c 75 64 65 73 20 3d | 20 31 3b 0d 09 62 72 65 |cludes =| 1;..bre|
|00005e70| 61 6b 3b 0d 0d 20 20 20 | 20 20 20 63 61 73 65 20 |ak;.. | case |
|00005e80| 27 75 27 3a 0d 09 2f 2a | 20 53 75 6e 20 63 6f 6d |'u':../*| Sun com|
|00005e90| 70 69 6c 65 72 20 70 61 | 73 73 65 73 20 75 6e 64 |piler pa|sses und|
|00005ea0| 6f 63 75 6d 65 6e 74 65 | 64 20 73 77 69 74 63 68 |ocumente|d switch|
|00005eb0| 20 22 2d 75 6e 64 65 66 | 22 2e 0d 09 20 20 20 4c | "-undef|"... L|
|00005ec0| 65 74 27 73 20 61 73 73 | 75 6d 65 20 69 74 20 6d |et's ass|ume it m|
|00005ed0| 65 61 6e 73 20 74 6f 20 | 69 6e 68 69 62 69 74 20 |eans to |inhibit |
|00005ee0| 74 68 65 20 70 72 65 64 | 65 66 69 6e 65 64 20 73 |the pred|efined s|
|00005ef0| 79 6d 62 6f 6c 73 2e 20 | 20 2a 2f 0d 09 69 6e 68 |ymbols. | */..inh|
|00005f00| 69 62 69 74 5f 70 72 65 | 64 65 66 73 20 3d 20 31 |ibit_pre|defs = 1|
|00005f10| 3b 0d 09 62 72 65 61 6b | 3b 0d 0d 20 20 20 20 20 |;..break|;.. |
|00005f20| 20 63 61 73 65 20 27 5c | 30 27 3a 20 2f 2a 20 4a | case '\|0': /* J|
|00005f30| 46 20 68 61 6e 64 6c 65 | 20 27 2d 27 20 61 73 20 |F handle| '-' as |
|00005f40| 66 69 6c 65 20 6e 61 6d | 65 20 6d 65 61 6e 69 6e |file nam|e meanin|
|00005f50| 67 20 73 74 64 69 6e 20 | 6f 72 20 73 74 64 6f 75 |g stdin |or stdou|
|00005f60| 74 20 2a 2f 0d 09 69 66 | 20 28 69 6e 5f 66 6e 61 |t */..if| (in_fna|
|00005f70| 6d 65 20 3d 3d 20 4e 55 | 4c 4c 29 20 7b 0d 09 20 |me == NU|LL) {.. |
|00005f80| 20 69 6e 5f 66 6e 61 6d | 65 20 3d 20 22 22 3b 0d | in_fnam|e = "";.|
|00005f90| 09 20 20 62 72 65 61 6b | 3b 0d 09 7d 20 65 6c 73 |. break|;..} els|
|00005fa0| 65 20 69 66 20 28 6f 75 | 74 5f 66 6e 61 6d 65 20 |e if (ou|t_fname |
|00005fb0| 3d 3d 20 4e 55 4c 4c 29 | 20 7b 0d 09 20 20 6f 75 |== NULL)| {.. ou|
|00005fc0| 74 5f 66 6e 61 6d 65 20 | 3d 20 22 22 3b 0d 09 20 |t_fname |= "";.. |
|00005fd0| 20 62 72 65 61 6b 3b 0d | 09 7d 09 2f 2a 20 65 6c | break;.|.}./* el|
|00005fe0| 73 65 20 66 61 6c 6c 20 | 74 68 72 6f 75 67 68 20 |se fall |through |
|00005ff0| 69 6e 74 6f 20 65 72 72 | 6f 72 20 2a 2f 0d 0d 20 |into err|or */.. |
|00006000| 20 20 20 20 20 64 65 66 | 61 75 6c 74 3a 0d 09 66 | def|ault:..f|
|00006010| 61 74 61 6c 20 28 22 49 | 6e 76 61 6c 69 64 20 6f |atal ("I|nvalid o|
|00006020| 70 74 69 6f 6e 20 60 25 | 73 27 22 2c 20 61 72 67 |ption `%|s'", arg|
|00006030| 76 5b 69 5d 29 3b 0d 20 | 20 20 20 20 20 7d 0d 20 |v[i]);. | }. |
|00006040| 20 20 20 7d 0d 20 20 7d | 0d 0d 20 20 2f 2a 20 4e | }. }|.. /* N|
|00006050| 6f 77 20 74 68 61 74 20 | 64 6f 6c 6c 61 72 73 5f |ow that |dollars_|
|00006060| 69 6e 5f 69 64 65 6e 74 | 20 69 73 20 6b 6e 6f 77 |in_ident| is know|
|00006070| 6e 2c 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 69 73 |n, initi|alize is|
|00006080| 5f 69 64 63 68 61 72 2e | 20 20 2a 2f 0d 20 20 69 |_idchar.| */. i|
|00006090| 6e 69 74 69 61 6c 69 7a | 65 5f 63 68 61 72 5f 73 |nitializ|e_char_s|
|000060a0| 79 6e 74 61 78 20 28 29 | 3b 0d 0d 20 20 2f 2a 20 |yntax ()|;.. /* |
|000060b0| 49 6e 73 74 61 6c 6c 20 | 5f 5f 4c 49 4e 45 5f 5f |Install |__LINE__|
|000060c0| 2c 20 65 74 63 2e 20 20 | 4d 75 73 74 20 66 6f 6c |, etc. |Must fol|
|000060d0| 6c 6f 77 20 69 6e 69 74 | 69 61 6c 69 7a 65 5f 63 |low init|ialize_c|
|000060e0| 68 61 72 5f 73 79 6e 74 | 61 78 0d 20 20 20 20 20 |har_synt|ax. |
|000060f0| 61 6e 64 20 6f 70 74 69 | 6f 6e 20 70 72 6f 63 65 |and opti|on proce|
|00006100| 73 73 69 6e 67 2e 20 20 | 2a 2f 0d 20 20 69 6e 69 |ssing. |*/. ini|
|00006110| 74 69 61 6c 69 7a 65 5f | 62 75 69 6c 74 69 6e 73 |tialize_|builtins|
|00006120| 20 28 29 3b 0d 0d 20 20 | 2f 2a 20 44 6f 20 73 74 | ();.. |/* Do st|
|00006130| 61 6e 64 61 72 64 20 23 | 64 65 66 69 6e 65 73 20 |andard #|defines |
|00006140| 74 68 61 74 20 69 64 65 | 6e 74 69 66 79 20 70 72 |that ide|ntify pr|
|00006150| 6f 63 65 73 73 6f 72 20 | 74 79 70 65 2e 20 20 2a |ocessor |type. *|
|00006160| 2f 0d 0d 20 20 69 66 20 | 28 21 69 6e 68 69 62 69 |/.. if |(!inhibi|
|00006170| 74 5f 70 72 65 64 65 66 | 73 29 20 7b 0d 20 20 20 |t_predef|s) {. |
|00006180| 20 63 68 61 72 20 2a 70 | 20 3d 20 28 63 68 61 72 | char *p| = (char|
|00006190| 20 2a 29 20 61 6c 6c 6f | 63 61 20 28 73 74 72 6c | *) allo|ca (strl|
|000061a0| 65 6e 20 28 70 72 65 64 | 65 66 73 29 20 2b 20 31 |en (pred|efs) + 1|
|000061b0| 29 3b 0d 20 20 20 20 73 | 74 72 63 70 79 20 28 70 |);. s|trcpy (p|
|000061c0| 2c 20 70 72 65 64 65 66 | 73 29 3b 0d 20 20 20 20 |, predef|s);. |
|000061d0| 77 68 69 6c 65 20 28 2a | 70 29 20 7b 0d 20 20 20 |while (*|p) {. |
|000061e0| 20 20 20 63 68 61 72 20 | 2a 71 3b 0d 20 20 20 20 | char |*q;. |
|000061f0| 20 20 69 66 20 28 70 5b | 30 5d 20 21 3d 20 27 2d | if (p[|0] != '-|
|00006200| 27 20 7c 7c 20 70 5b 31 | 5d 20 21 3d 20 27 44 27 |' || p[1|] != 'D'|
|00006210| 29 0d 09 61 62 6f 72 74 | 20 28 29 3b 0d 20 20 20 |)..abort| ();. |
|00006220| 20 20 20 71 20 3d 20 26 | 70 5b 32 5d 3b 0d 20 20 | q = &|p[2];. |
|00006230| 20 20 20 20 77 68 69 6c | 65 20 28 2a 70 20 26 26 | whil|e (*p &&|
|00006240| 20 2a 70 20 21 3d 20 27 | 20 27 29 20 70 2b 2b 3b | *p != '| ') p++;|
|00006250| 0d 20 20 20 20 20 20 69 | 66 20 28 2a 70 20 21 3d |. i|f (*p !=|
|00006260| 20 30 29 0d 09 2a 70 2b | 2b 3d 20 30 3b 0d 20 20 | 0)..*p+|+= 0;. |
|00006270| 20 20 20 20 6d 61 6b 65 | 5f 64 65 66 69 6e 69 74 | make|_definit|
|00006280| 69 6f 6e 20 28 71 29 3b | 0d 20 20 20 20 7d 0d 20 |ion (q);|. }. |
|00006290| 20 7d 0d 0d 20 20 2f 2a | 20 44 6f 20 64 65 66 69 | }.. /*| Do defi|
|000062a0| 6e 65 73 20 73 70 65 63 | 69 66 69 65 64 20 77 69 |nes spec|ified wi|
|000062b0| 74 68 20 2d 44 2e 20 20 | 2a 2f 0d 20 20 66 6f 72 |th -D. |*/. for|
|000062c0| 20 28 69 20 3d 20 31 3b | 20 69 20 3c 20 61 72 67 | (i = 1;| i < arg|
|000062d0| 63 3b 20 69 2b 2b 29 0d | 20 20 20 20 69 66 20 28 |c; i++).| if (|
|000062e0| 70 65 6e 64 5f 64 65 66 | 73 5b 69 5d 29 0d 20 20 |pend_def|s[i]). |
|000062f0| 20 20 20 20 6d 61 6b 65 | 5f 64 65 66 69 6e 69 74 | make|_definit|
|00006300| 69 6f 6e 20 28 70 65 6e | 64 5f 64 65 66 73 5b 69 |ion (pen|d_defs[i|
|00006310| 5d 29 3b 0d 0d 20 20 2f | 2a 20 44 6f 20 75 6e 64 |]);.. /|* Do und|
|00006320| 65 66 69 6e 65 73 20 73 | 70 65 63 69 66 69 65 64 |efines s|pecified|
|00006330| 20 77 69 74 68 20 2d 55 | 2e 20 20 2a 2f 0d 20 20 | with -U|. */. |
|00006340| 66 6f 72 20 28 69 20 3d | 20 31 3b 20 69 20 3c 20 |for (i =| 1; i < |
|00006350| 61 72 67 63 3b 20 69 2b | 2b 29 0d 20 20 20 20 69 |argc; i+|+). i|
|00006360| 66 20 28 70 65 6e 64 5f | 75 6e 64 65 66 73 5b 69 |f (pend_|undefs[i|
|00006370| 5d 29 0d 20 20 20 20 20 | 20 6d 61 6b 65 5f 75 6e |]). | make_un|
|00006380| 64 65 66 20 28 70 65 6e | 64 5f 75 6e 64 65 66 73 |def (pen|d_undefs|
|00006390| 5b 69 5d 29 3b 0d 0d 20 | 20 2f 2a 20 55 6e 6c 65 |[i]);.. | /* Unle|
|000063a0| 73 73 20 2d 66 6e 6f 73 | 74 64 69 6e 63 2c 0d 20 |ss -fnos|tdinc,. |
|000063b0| 20 20 20 20 74 61 63 6b | 20 6f 6e 20 74 68 65 20 | tack| on the |
|000063c0| 73 74 61 6e 64 61 72 64 | 20 69 6e 63 6c 75 64 65 |standard| include|
|000063d0| 20 66 69 6c 65 20 64 69 | 72 73 20 74 6f 20 74 68 | file di|rs to th|
|000063e0| 65 20 73 70 65 63 69 66 | 69 65 64 20 6c 69 73 74 |e specif|ied list|
|000063f0| 20 2a 2f 0d 20 20 69 66 | 20 28 21 6e 6f 5f 73 74 | */. if| (!no_st|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.